[CMake] relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu May 31 09:10:57 EDT 2007


Hello,

  I have the following two targets:

ADD_LIBRARY(foo STATIC ${foo_C_SRCS}) # C files
ADD_LIBRARY(bla SHARED ${bla_CPP_SRCS}) # CXX files
TARGET_LINK_LIBRARIES(bla foo)

  When compiled with cmake on a 64bits machine I am getting:

...
relocation R_X86_64_32 can not be used when making a shared object;
recompile with -fPIC
...

  Is this ok on most system, or there something against static lib
used in a shared lib ?

thanks,

-- 
Mathieu


More information about the CMake mailing list