automake
[Top][All Lists]
Advanced

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

Re: R_X86_64_32S error building a shared library


From: Bob Friesenhahn
Subject: Re: R_X86_64_32S error building a shared library
Date: Mon, 26 Jan 2009 11:01:28 -0600 (CST)

On Mon, 26 Jan 2009, Adam Nielsen wrote:

I think it must have been the way Boost was compiled, because I get the same error even when I don't link to any libraries:

$ g++ -c -o main.o main.cpp -I/usr/include/boost-1_37/ && g++ -o test.so main.o -shared

Note that with the above, "main.o" would need to be PIC code since it is being put in a shared library.

But if I add -fPIC in that case, it works:

$ 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.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/





reply via email to

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