[CMake] Xcode C++ linking

Michael Wild themiwi at gmail.com
Wed Mar 2 04:02:16 EST 2011


On 03/02/2011 09:05 AM, Robert Bielik wrote:
> Hi,
> 
> I'm trying to set Xcode to have static linking to the C++ standard
> libary, but I don't know how to. Also, Xcode mention that
> to make this work reliably, "Symbols hidden by default" must be enabled.
> 
> Tips ? :)
> 
> TIA
> /Rob

Probably this means to add -fvisibility=hidden and -static. However,
-static will cause you to link everything statically, which will fail if
you pass a dynamic library to target_link_libraries().

Michael


More information about the CMake mailing list