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
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



Reply via email to