[CMake] Import library not generated under Visual Studio

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Thu Jun 5 04:18:32 EDT 2008


> Von: Martin Apel
> Hi all,
> 
> I am trying to port a project using CMake 2.6 from Linux to Windows. The 
> project build works without problems under Linux. However when trying to 
> build the project inside Visual Studio 8 after having generated the 
> project files using CMake, no import libraries are generated.
> The library build step is specified by using
>   ADD_LIBRARY(Base SHARED EXCLUDE_FROM_ALL ${LocalSrc})
> which I would expect to generate rules to create the DLL AND the 
> corresponding import library. The DLL is built, but the import library 
> is missing. Looking at the build log file in Visual Studio, there is no 
> call to lib.exe, which I would expect.
> I am not a Windows specialist, so I may be missing something simple 
> completely.
> 
> Any help would be appreciated.
> 
cmake itself does not do anything to create an import lib. This is all done by the linker. If it finds symbols which are exported, it automatically creates the import lib.
So it looks like you don't export any symbols.


Christian

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx


More information about the CMake mailing list