[CMake] CMake -fPIC

ami guru dosto.walla at gmail.com
Thu Nov 13 18:11:01 EST 2008

Hello forum,

I am sorry that i have posted a topic that has already been  several times
but i did not find
any solution to the one that i am experiencing now.

I have an API compiled with CMake.

And While linking i get  the following error:

[100%] Building CXX object
Linking CXX shared library libH3DAPI.so
relocation R_X86_64_32S against `vtable for FTFont' can not be used when
making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libftgl.a: could not
read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libH3DAPI.so.2.0.0] Error 1
make[1]: *** [CMakeFiles/H3DAPI.dir/all] Error 2
make: *** [all] Error 2


Where should i include the -fPIC flag in the CMakeLists.txt

the error says FTGL library is getting some bad symbols and FTGL is compiled
with -fPIC and
FTGL is used by H3D API that is compiled with CMake

Please let me know if more  details are required


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081114/40ae5ad1/attachment.htm>

More information about the CMake mailing list