[Cmake] for compiling DLLs I need some .libs
William A. Hoffman
billlist at nycap.rr.com
Mon, 16 Feb 2004 13:42:37 -0500
See this posting:
http://www.cmake.org/pipermail/cmake/2003-March/003516.html
At 01:07 PM 2/16/2004, Adolfo González Uzábal wrote:
>Hi all.
>
>I'm using CMake 1.6 for compiling a project with MSVC++ 6.0, linking with ITK,
>with Win32 Debug configuration.
>
>I can compile STATIC libraries and call them from my own applications.
>
>Now I'm trying to compile SHARED libraries.
>
>I've changed the CMakeLists according to this, so instructions like:
>
> ADD_LIBRARY(myLibrary STATIC ${SOURCE_FILES})
> ADD_LIBRARY(myOtherLibrary STATIC ${SOURCE_FILES})
>
>have become:
>
> ADD_LIBRARY(myLibrary SHARED ${SOURCE_FILES})
> ADD_LIBRARY(myOtherLibrary SHARED ${SOURCE_FILES})
>
>But now, I've got some troubles:
>
>.- First I got "unresolved external" errors because of "myOtherLibrary" needs
>functions defined in "myLibrary".
>
>.- Then I've included a line like:
>
> TARGET_LINK_LIBRARIES (myOtherLibrary myLibrary)
>
>inside the related CMakeLists.txt but then I get:
>
> LINK : fatal error LNK1104: cannot open file "miLibrary.lib"
>
>which is truly correct since I've built myLibrary.dll but not myLibrary.lib.
>
>Have I missed something?
>
>Best wishes
>Adolfo G.U.
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake