to export or not to export, that is the question
- From: Rick Jones <rick jones2 hp com>
- To: gtk-list gnome org
- Subject: to export or not to export, that is the question
- Date: Mon, 03 Apr 2006 12:50:04 -0700
Having read:
<http://developer.gnome.org/doc/API/2.0/glib/glib-Dynamic-Loading-of-Modules.html>
and despite its not being Shakespear I am left asking:
To export or not to export, that is the question. Whether 'tis nobler to
suffer... well anyway, when should one use "gmodule-2.0" with pkg-config
and when should one use the "export" version or the "no-export" version?
The API reference is mute on the topic.
The reason I ask stems from a problem I am encountering using pkg-config
- it is not always the case that the compiler used to compile the
libraries to be used is the same compiler used to compile the program
which wishes to use those libraries. This means that the full --cflags
and/or --libs may contain options that the compiler being used to
compile the program will not understand. In my specific case, I am
using the glib (and libxml) from http://hpux.connect.org.uk/ which was
compiled with GCC but wish to compile netperf4 with HP ANSI C. Or, more
to the point, I do not wish to dictate the compiler used by the person
wishing to use netperf4. Netperf4 is to be "portable" C code and so
should not depend on a specific compiler.
Those gcc-compiled bits have --pthread in the --cflags and --libs
output, which is an option not understood by HP ANSI C. So, I find
myself experimenting with --cflags-only-I, --libs-only-L and
--libs-only-l which will leave only options known to all (or at least
99 out of 10) compilers but I'm leaving stuff like -pthread and
-Wl,--export-dynamic on the floor which may or may not be "OK" and
while looking into that I came across the "export" and "no-export"
flavors of gmodule pkg-config packages.
rick jones
FWIW, it would seem that the GCC with Xcode for 10.3.9 is 3.3 which also
does not grok -pthread under OSX, so this meta-issue seems to crop-up
even between versions of gcc.
PPS and yes, I have asked the meta question about differing compilers in
the pkg-config mailing list :)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]