On 29. Sep, 2010, at 18:25 , David Aldrich wrote:

> Hi
> 
> My C++ code consists of an executable and several shared libraries.
> 
> With my CMake build files, I find that the executable fails to load the 
> shared libraries ( the dlopen() call results in error 'undefined symbol...' ).
> 
> The software works fine under our production build system that uses manually 
> coded makefiles.
> 
> I notice that the production system linker command invokes -fpic, while CMake 
> uses -fPIC. I am wondering if that is the reason.
> 
> I set the compile flags with:
> 
> set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -Wall -m64" )
> 
> How can I replace -fPIC with -fpic in CMake please?
> 
> Best regards
> David


The only difference between -fpic and -fPIC is that the latter has no limit on 
the size of the global offsets table and this is only relevant for the m68k, 
PowerPC and SPARC architectures (according to the GCC manual page). So I really 
doubt this is the problem. Are you using -fvisibility=hidden somewhere?

Michael

--
There is always a well-known solution to every human problem -- neat, 
plausible, and wrong.
H. L. Mencken

Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to