[CMake] How to build a DLL?

Brad King brad.king at kitware.com
Wed Sep 29 09:08:09 EDT 2004


Lars Pechan wrote:
> Hi there,
> Can someone please tell me how I specify what functions to export for a 
> Win32 dll? Is there any way of specifying an export file?

To specify functions in the source, use __declspec(dllexport):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccelng/htm/msmod_20.asp

To specify an export file, just add the .def file to the list of source 
files and CMake will put it in the project.

-Brad


More information about the CMake mailing list