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 following table shows a comprehensive list of options for LINK.EXE.
| Option | Action |
|---|---|
| /ALIGN:number | Specifies the alignment of each section |
| /ALLOWBIND | Specifies that a .dll cannot be bound |
| /ASSEMBLYMODULE | Specifies that a Microsoft Intermediate Language module should be imported into the assembly. |
| /BASE:{address | @filename,key} | Sets a base address for the program |
| /DEBUG | Creates debugging information |
| /DEF:filename | Passes a module-definition (.DEF) file to the linker |
| /DEFAULTLIB:library | Searches specified library when resolving external references |
| /DELAY | Controls the delayed loading of DLLs |
| /DELAYLOAD | Causes the delayed loading of the specified DLL |
| /DLL | Builds a DLL |
| /DRIVER[:UPONLY] | Creates a Windows NT kernel mode driver |
| /ENTRY:function | Sets the starting address |
| /EXETYPE:DYNAMIC | Builds a virtual device driver |
| /EXPORT | Exports a function |
| /FIXED[:NO] | Creates a program that can be loaded only at its preferred base address |
| /FORCE[:{MULTIPLE|UNRESOLVED}] | Forces link to complete in spite of unresolved or multiply defined symbols |
| /HEAP:reserve[,commit] | Sets the size of the heap in bytes |
| /IDLOUT | Specifies the name of the .idl file and other MIDL output files |
| /IGNOREIDL | Prevents processing attribute information in an .idl file. |
| /IMPLIB:filename | Overrides the default import library name |
| /INCLUDE:symbol | Forces symbol references |
| /LIBPATH:path | Allows the user to override the environmental library path |
| /LTCG | Specifies link-time code generation. |
| /MACHINE:{ARM|IA64|MIPS|MIPS16|MIPSFPU|SH4|THUMB|X86} | Specifies the target hardware platform |
| /MAP | Creates a map file |
| /MAPINFO:{EXPORTS|LINES} | Includes the specified information in the map file |
| /MERGE:from=to | Combines sections |
| /MIDL | Specifies MIDL command-line options. |
| /NODEFAULTLIB[:library] | Ignores all (or specified) default libraries when resolving external references |
| /NOENTRY | Creates a resource-only DLL |
| /NOLOGO | Suppresses startup banner |
| /OPT:{REF|NOREF|ICF[,iterations]|NOICF} | Controls LINK optimizations |
| /ORDER:@filename | Places COMDATs into the image in a predetermined order |
| /OUT:filename | Specifies the output file name |
| /PDB:filename | Creates a program database (.PDB) file |
| /PDBSTRIPPED | Omits private symbols from the program database file |
| /RELEASE | Sets the checksum in the .EXE header |
| /SAVEBASERELOCATIONS | Causes a REL file to be created for address relocations done on modules built using the Platform Builder IDE. |
| /SECTION:name,attributes | Overrides the attributes of a section |
| /STACK:reserve[,commit] | Sets the size of the stack in bytes |
| /STUB:filename | Attaches an MS-DOS stub program to a Win32 program |
| /SUBSYSTEM:{CONSOLE|WINDOWS|NATIVE|POSIX|WINDOWSCE} [,major[.minor] ] | Tells the operating system how to run the .EXE file |
| /SWAPRUN:{NET|CD} | Tells the operating system to copy the linker output to a swap file before running it |
| /TLBID | Allows you to specify the resource ID of the linker-generated type library. |
| /TLBOUT | Specifies the name of the .tlb file and other MIDL output files. |
| /TSAWARE | Creates an application that is specifically designed to run under Terminal Server. |
| /VERBOSE[:LIB] | Prints linker progress messages |
| /VERSION:major[.minor] | Assigns a version number |
| /VXD | Creates a virtual device driver (VxD) |
| /WS:AGGRESSIVE | Aggressively trim process memory |
See Also
Linker Options | Compiler-Controlled LINK Options | Compiler Option Reference
Send Feedback on this topic to the authors