[CMake] Cmake 2.2.2 with Visual Studio 6. .lib? .dll?

Daniel Tourde ted at foi.se
Tue Nov 29 06:14:46 EST 2005


Hello Filipe,


> I was talking about making -Wall default on gcc. This has nothing to do with 
VS6.

> If you want to add extra flags to your compiler you should use CMAKE_C_GLAGS 
or CMAKE_CXX_FLAGS.

>IF(UNIX)
>  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
>ELSE(UNIX)
>  IF(WIN32)
>    ...
>  ENDIF(WIN32)
>ENDIF(UNIX)

>I don't know much about VS compiler flags.

I tried what you indicated and it seems to work.


>> - Then, the name of the library produced (a .dll when cmake seems to 
indicate 
>> that it looks for a .lib).

>VS compiler needs the .lib for compile-time. The .dll is only needed in 
run-time

Yes but that's the point. When VS tries to link a test program to the new 
library it looks for a .lib that it does not find because there is .dll.

How am I supposed to solve this problem?

-- 
**********************************************************************
Daniel TOURDE                            E-mail : daniel.tourde at foi.se
                                            Tel : +46 (0)8-55 50 32 12
                                            Fax : +46 (0)8-55 50 30 68
                                       Cellular :  +46 (0)70-849 93 40
FOI, Swedish Defence Research Agency; Systemteknik
Dept. of Wind Energy and Aviation Environmental Research
SE-164 90 Stockholm, Sweden
**********************************************************************


More information about the CMake mailing list