dllmake

dllmake, written by Mark Schoenberg of Emmes Technologies, is a package that makes DLLs in one simple step. It starts with the source code for the DLL and creates an appropriate header file, a ".def" file, the DLL, and also an import library, so that the DLL may be linked to any C or C++ program. The package, which consists of a shell script of the same name and one program, genhdr, runs in both the Cygwin and the Mingw environments.

If you start with DLL code in a file named mydll.c, the header file created will be named mydll_dll.h, the ".def" file mydll.def, the DLL mydll.dll, and the import library file mydll.a.

The only requirement for the DLL source code you provide is that it be compileable, and that the definition of each function you want exported (made linkable) is preceded by the word EXPORT (capitals important). When dllmake creates the actual DLL, it does so compiling a file generated by genhdr which is based upon, but not necessary identical to your DLL source code. The line "#include mydll_dll.h" is always included in the source code which is compiled, so it is not necessary for it to be explicitly included in your DLL source code.

Building and installing dllmake from source:

To build, simply type the command "make", and to install, simply copy dllmake and gendhr.exe to any directory in your execution path.

Using dllmake:

In order to create a DLL from mydll.c, execute the command "dllmake mydll" remembering not to include the extension ".c" on the command line.

By default, the shell script dllmake is configured to not use the Cygwin libraries as is the case when operating under Mingw. If your DLL functions require the Cygwin libraries to compile properly, simple edit dllmake and remove "-mno-cygwin" from the definition of OPTS.

Please send bug reports or suggestions for improvement to .