Documentation for Build v2.08
Table of Contents

DLL Libraries

How to create a DLL library using Build.


When Build finds a DllMain() function, or the -dll switch is used, it creates a special type of Module Definition file, and sets the target to to be a DLL file. The Module Definition file generated takes the form ...
LIBRARY "<targetname>.dll";
EXETYPE NT
SUBSYSTEM WINDOWS,<version>
CODE PRELOAD DISCARDABLE SHARED EXECUTE
DATA PRELOAD SINGLE WRITE

You can replace any of these by explicitly coding a pragma(/build_def) with different options than these defaults shown here.

Also, if you have the program implib in your path, it will be run after the DLL file is created, in order to also create a .lib library to interface with the DLL. Build currently supports both the DigitalMars version and the Borland (Inprise) version of implib.