On Monday 2009-01-26 23:33, Adam Nielsen wrote:
>>> $ g++ -fPIC -c -o main.o main.cpp -I/usr/include/boost-1_37/ && g++ -o
>>> test.so main.o -shared
>>
>> This works since main.cpp is being compiled to main.o with PIC. However, 
>> Boost
>> is not involved here so it proves nothing about Boost.
>
> It does prove something about Boost to me - as soon as I add the Boost
> libraries to the above program I get the error, which implies that something
> isn't compiled with -fPIC.  Since Boost was the only thing added, Boost must
> have been compiled without -fPIC.

As previously mentioned, that's just natural for .a libraries :)
I think libtool is supposed to record this "discrepancy"
into the .la files it generates, and at the end of the way,
when a program is linked against mylib.la, it will finally
pull in the boost.a - in the last stage mind ye, when one is
about to produce the program, the one spot where non-PIC is ok.


Reply via email to