开发者

Generating .dll using CMake

I have the following C files in windows XP. optBladWriter.c optWriteNlpEmpsFile.c I would like to generate DLL for this code. I used the command add_library . My make file has the following :

CMAKE_MINIMUM_REQUIRED ( VERSIO开发者_如何学PythonN 2.6)
add_library (optFmg optBladWriter.c optWriteNlpEmpsFile.c) 

after running CMake using command prompt Project.sln is created. I imported it to the visual studio and built it. I got the optFmg.lib file. But I want the optFmg.dll file.

Can you help me in generating the dll file using cmake in the above case. Is there any particular command similar to add_library.


As documented, the default type of library is determined by the BUILD_SHARED_LIBS variable. You can explicitly request a shared library with:

add_library(yourlib SHARED file.c ...)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜