LINK is a tool that links Common Object File Format (COFF) object files and libraries to create a executable (.exe) file or dynamic-link library (DLL).
The table that follows is a comprehensive list of options for LINK.exe. This section also includes information about:
Linker options specified on the command line are not case sensitive: /base and /BASE mean the same thing.
You can specify some linker options by using the comment pragma.
Specifies a response file
Specifies the alignment of each section
Specifies that a DLL cannot be bound
Specifies behavior for manifest lookup.
Adds the DebuggableAttribute to a managed image.
Create a link to a managed resource.
Specifies that a Microsoft intermediate language (MSIL) module should be imported into the assembly
Embeds a managed resource file to an assembly
Sets a base address for the program
Sets the type (IJW, pure, or safe) of a CLR image.
Preserves the last error code of functions called through the P/Invoke mechanism.
Specify which threading attribute you want applied to the entry point of your CLR program.
/CLRUNMANAGEDCODECHECK specifies whether the linker will apply the SuppressUnmanagedCodeSecurity attribute to linker-generated PInvoke stubs that call from managed code into native DLLs.
Creates debugging information
Passes a module-definition (.def) file to the linker
Searches the specified library when resolving external references
Controls the delayed loading of DLLs
Causes the delayed loading of the specified DLL
Partially sign an assembly.
Builds a DLL
Creates a Windows NT kernel mode driver
Specifies whether to generate an executable image that can be randomly rebased at load-time by using the address space layout randomization (ASLR) feature of Windows Vista.
Sets the starting address
Report internal linker errors to Microsoft.
Exports a function
Creates a program that can be loaded only at its preferred base address
Forces a link to complete even with unresolved or symbols defined more than once
Creates a hotpatchable image.
Sets the size of the heap in bytes
Specifies the name of the .idl file and other MIDL output files
Prevents processing attribute information into an .idl file
Overrides the default import library name
Forces symbol references
Controls incremental linking
Specify a key container to sign an assembly.
Specify key or key pair to sign an assembly.
Tells the compiler that the application supports addresses larger than two gigabytes
Allows the user to override the environmental library path
Specifies link-time code generation
Specifies the target platform
Create a side-by-side manifest file.
Specify a <dependentAssembly> section in your manifest file.
Change the default name of the manifest file.
Specifies whether User Account Control (UAC) information is embedded in the program manifest.
Creates a mapfile
Includes the specified information in the mapfile
Specifies MIDL command-line options
Suppresses the creation of a .NET Framework assembly
Ignores all (or specified) default libraries when resolving external references
Creates a resource-only DLL
Suppresses startup banner
Marks an executable as tested to be compatible with Windows Data Execution Prevention feature.
Controls LINK optimizations
Places COMDATs into the image in a predetermined order
Specifies the output file name
Creates a program database (PDB) file
Uses an alternate location to save a PDB file.
Creates a program database (PDB) file that has no private symbols
Specify .pgd file for profile guided optionizations.
Produces an output file that can be used with the Performance Tools profiler.
Sets the Checksum in the .exe header
Specify that the image will contain a table of safe exception handlers.
Overrides the attributes of a section
Sets the size of the stack in bytes
Attaches an MS-DOS stub program to a Win32 program
Tells the operating system how to run the .exe file
Tells the operating system to copy the linker output to a swap file before it is run
Allows you to specify the resource ID of the linker-generated type library
Specifies the name of the .tlb file and other MIDL output files
Creates an application that is designed specifically to run under Terminal Server
Prints linker progress messages
Assigns a version number
Treat linker warnings as errors.
For more information, see Compiler-Controlled LINK Options.