From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2004-12-16 08:44:20
Caleb Epstein wrote:
>>>>An option that also emits all the compilation flags that were used to
>>>>compile the library would be nice too, to make sure compiles are done
>>>>the same way...
>>>Thats what pkg-config --cflags is for.
>>I though that emits the flags that /should/be/ used to compile against
>>Boost, not the flags the /were/ used to compile Boost itself.
> I guess that is the case, but what would the difference be between the two?
> The only thing that springs immediately to mind would be preprocessor
> macros that would turn on e.g. __declspec(dllexport).
There are a number of flags that have to be made public, such as
what type of runtime to use (that could mean, among others, the definition
of __REENTRANT or the '-pthread' compiler flag). Also, on some platforms
the dependency on dynamic libraries isn't well encapsulated, i.e. if libA.so
depends on libB.so, an executable linking against libB.so also needs to be
linked (explicitely) against libA.so.
There is quite some variation between different platforms, and pkg-config
tries to make life a bit easier for developers of portable code.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk