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 ( VERSION 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 ...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With