Skip to main content

Problem:

Module-definition (.def) files provide the linker with information about exports, attributes, and other information about the program to be linked. A .def file is most useful when building a DLL. Because there are linker options that can be used instead of module-definition statements, .def files are generally not necessary.

Microsoft URL explaining  .DEF files: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_module.2d.definition_files.asp

If, after compiling your COBOL program, these files ( .exp, .lib, .def ), appear, it is possible to eliminate them.

Resolution:

The problem is due to the link settings in the Project Build Settings of the DLLs in the project.  So for each DLL do the following:

1)  Right lick on the DLL and select Project Build Settings.

2)  Click on the "Link" tab and then from the drop-down menu, select "Advanced".

3)  In the Options there is one called "Delete Temporary Linker Files" - this is more than likely to be activated.  Simply uncheck the check box.

On recompilation the .DEF files should not be present.

Old KB# 4178