Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The latest version of this topic can be found at -DEF (Specify Module-Definition File).
DEF:filename
## Remarks
where:
*filename*
The name of a module-definition file (.def) to be passed to the linker.
## Remarks
The /DEF option passes a module-definition file (.def) to the linker. Only one .def file can be specified to LINK. For details about .def files, see [Module-Definition Files](../Topic/Module-Definition%20\(.Def\)%20Files.md).
### To set this linker option in the Visual Studio development environment
1. Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../Topic/Working%20with%20Project%20Properties.md).
2. Click the **Linker** folder.
3. Click the **Input** property page.
4. Modify the **Module Definition File** property.
To specify a .def file from within the development environment, you should add it to the project along with other files and then specify the file to the /DEF option.
### To set this linker option programmatically
- See [ModuleDefinitionFile](assetId:///P:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.ModuleDefinitionFile?qualifyHint=False&autoUpgrade=True).
## See Also
[Setting Linker Options](../Topic/Setting%20Linker%20Options.md)
[Linker Options](../Topic/Linker%20Options.md)