[CMake] Cmake 2.2.2 with Visual Studio 6. Bug?

Daniel Tourde ted at foi.se
Thu Nov 24 08:54:37 EST 2005


Hello Alexander,

Here are the files: The KDE project and the original CMakeLists.txt (the one 
in ./src)


> > Thank you very much for your answer. It solved indeed the problem but
> > an other one appeared:
> >
> > Everything compiles fine but at one given moment, VS6 complains that
> > the linker cannot link to libted.lib (libted being the name of my
> > 'project'). I checked what had been built and I found a libted.dll...
> > What do you think  about that? What am I supposed to do now?
>
> You need to give more information about this.
> Maybe post your CMakeLists.txt. Is libted.dll built using cmake ?

Yes

> If yes, 
> then under linux its name would be "liblibted.so", is this the case ?

Yes

> You should use
> ADD_LIBRARY(ted ${your_sources})
> ...
>
> TARGET_LINK_LIBRARIES( your_executable ted)
>
> It should work then.

I don't really understand what you mean there.


		Daniel
-- 
**********************************************************************
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
**********************************************************************
-------------- next part --------------
#this is just a basic CMakeLists.txt, for more information see the cmake manpage

#add definitions, compiler switches, etc.
IF (WIN32) 
   ADD_DEFINITIONS() 
ELSE (WIN32) # not windows, but e.g. linux 
   ADD_DEFINITIONS(-Wall -O2) 
ENDIF (WIN32)

#build a shared library
ADD_LIBRARY(libted SHARED libted.cpp)

#for testing the shared library you probably need some test app too
ADD_EXECUTABLE(libtedtest libtedtest.cpp)

#need to link to some other libraries ? just add them here
TARGET_LINK_LIBRARIES(libtedtest libted)

#add an install target here
#INSTALL_FILES(...)
#INSTALL_PROGRAMS(...)
#INSTALL_TARGET(...)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libted.tar.gz
Type: application/x-tgz
Size: 18237 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20051124/473f6c0e/libted.tar-0001.bin


More information about the CMake mailing list