[CMake] Convenience lib vs static library

Andreas Pakulat apaku at gmx.de
Sun Nov 23 17:05:51 EST 2008


On 23.11.08 20:56:24, James Mansion wrote:
> Andreas Pakulat wrote:
>> This is Ok for building an executable, but linking a static lib into a
>> shared lib is completely unportable and not supported on all operating
>> systems that cmake supports. Thats why its not done.
>>   
> Huh?  I'm not aware of that as a limitation - you *do* need the objects  
> in the static library to be
> position-independant or otherwise compiled as objects to go into a  
> shared library.

Thats ok on linux, to get it working on 64 bit systems (32 bit don't need
-fPIC). However on some systems this is not supported at all, i.e. the
linker simply doesn't support creating a shared library from static libs. I
think one of those systems is windows, or rather MSVC. 

Andreas

-- 
You're not my type.  For that matter, you're not even my species!!!


More information about the CMake mailing list