Share via


DLLDEF

Use the DLLDEF macro to specify the name of the .def file that the Build utility will pass to the librarian when it builds the export and import files.

If you do not set this value, the Build utility assumes that it is the same name as the image that you are building (in other words, equal to $(TARGETNAME).def).

The most common usage is:

DLLDEF=mydll.def

Additionally, there is a standard inference rule that will run the C preprocessor over the .def or .src file in the current directory to create build-specific .def files in the object subdirectory. The same compiler define directives that you key off of in your source code can be used in the root .def or .src file to create the export list. To enable it, use something like:

DLLDEF=$O\mydll.def

Here is an example of what mydll.src might look like:

; mydll.src
LIBRARY dllname // The dllname must match the name that was specified in the TARGETNAME macro
EXPORTS
#if defined(_X86_)
X86Routine
#elseif defined(_IA64_)
IA64Routine
#else
#error Unknown platform
#endif
// Grab some other exports from another file
#include "master.src"

 

 

Send comments about this topic to Microsoft

Build date: 5/3/2011