[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: R_X86_64_32S error building a shared library

From: Jan Engelhardt
Subject: Re: R_X86_64_32S error building a shared library
Date: Tue, 27 Jan 2009 00:26:26 +0100 (CET)
User-agent: Alpine 2.00 (LSU 1167 2008-08-23)

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
>>> 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, 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

[Prev in Thread] Current Thread [Next in Thread]