[Cmake] Building DLLs
Ian Main
Ian Main <ian-cmake at stemwinder . org>
Wed, 19 Mar 2003 00:42:02 -0800
So, thanks to all your help I got roy building on unix now all spiffy
like!
Now, I've moved onto getting it working on windows. I've been building
on win2k using MSVC++ 6.0.
I can build it fine with static libs, however, I added:
SET(BUILD_SHARED_LIBS "ON" CACHE BOOL "Turn on to build shared libraries.")
So that I could build shared libraries.. If I enable this on windows though
I get problems. My setup is actually a lot like the example Hello one. I have
libroy building along with some other libaries and some tests that need to link
to it. With shared libs on I get:
cannot open file "roy.lib"
So obviously it is still trying to link against the static version.
Another odd thing happens when I try to use the DLL for zlib. I select it in the
configuration and I get:
cannot open file "E:\cvs\zlib\dll32\zlib.dll.lib"
Now I'm probly missing something, and I know there's a lot more magic involved
with DLLs than with .so's..
Any Ideas?
Oh, I gather it's not possible to build both shared and static libs? That's
generally what us unix folk do, though I'm not sure why I suppose :)
Thanks,
Ian