[CMake] statically linking libstdc++ problem.

Brad King brad.king at kitware.com
Thu Jun 2 12:21:01 EDT 2005


Alexander Neundorf wrote:
>>Von: Brad King <brad.king at kitware.com> 
> 
> ... 
> 
>>2.) Create a directory that contains a symlink to the static version of  
>>the library and then use the LINK_DIRECTORIES command to add it to the  
>>link path.  Then the linker will find the static version and use it. 
> 
>  
> Shouldn't specifying the full path to the static library also work ? 
> TARGET_LINK_LIBRARIES(foo /usr/lib/.../libstdc++.a) ? 

Not in this case because the C++ compiler adds "-lstdc++" to the link line.

-Brad


More information about the CMake mailing list