NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Linker Options

LINK is a 32-bit tool that links Common Object File Format (COFF) object files and libraries to create a 32-bit executable (.exe) file or dynamic-link library (DLL).

Following is a comprehensive list of options for LINK.exe. This section also includes information on Compiler-Controlled LINK Options, LINK Input Files, and LINK Output.

Linker options specified on the command line are not case sensitive: /base and /BASE mean the same thing.

You can also specify some linker options via comment pragma.

Option Purpose
@ Specifies a response file.
/ALIGN Specifies the alignment of each section.
/ALLOWBIND Specifies that a DLL cannot be bound.
/ASSEMBLYMODULE Specifies that a Microsoft Intermediate Language (MSIL) module should be imported into the assembly.
/ASSEMBLYRESOURCE Links a NGWS resource file to an assembly.
/BASE Sets a base address for the program.
/DEBUG Creates debugging information.
/DEBUGTYPE Creates particular formats of debugging information.
/DEF Passes a module-definition (.def) file to the linker.
/DEFAULTLIB 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 Creates a Windows NT kernel mode driver.
/ENTRY Sets the starting address.
/EXETYPE Builds a virtual device driver.
/EXPORT Exports a function.
/FIXED Creates a program that can be loaded only at its preferred base address.
/FORCE Forces link to complete in spite of unresolved or multiply defined symbols.
/HEAP 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 into a .idl file.
/IMPLIB Overrides the default import library name.
/INCLUDE Forces symbol references.
/INCREMENTAL Controls incremental linking.
/LARGEADDRESSAWARE Tells the compiler that the application supports addresses larger than two gigabytes.
/LIBPATH Allows the user to override the environmental library path.
/LTCG Specifies link-time code generation.
/MACHINE Specifies the target platform.
/MAP Creates a map file .
/MAPINFO Includes the specified information in the map file.
/MERGE Combines sections.
/MIDL Specifies MIDL command line options.
/NOASSEMBLY Suppresses the creation of a NGWS assembly.
/NODEFAULTLIB Ignores all (or specified) default libraries when resolving external references.
/NOENTRY Creates a resource-only DLL.
/NOLOGO Suppresses startup banner.
/OPT Controls LINK optimizations.
/ORDER Places COMDATs into the image in a predetermined order.
/OUT Specifies the output file name.
/PDB Creates a program database (PDB) file.
/PDBSTRIPPED Create a program database (PDB) file with no private symbols.
/RELEASE Sets the checksum in the .exe header.
/SECTION Overrides the attributes of a section.
/STACK Sets the size of the stack in bytes.
/STUB Attaches an MS-DOS stub program to a Win32 program.
/SUBSYSTEM Tells the operating system how to run the .exe file.
/SWAPRUN 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 Specify 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 Prints linker progress messages.
/VERSION Assigns a version number.
/VXD Creates a virtual device driver (VxD).
/WS Aggressively trim process memory.

For related information, see Compiler-Controlled LINK Options.

See Also

Building a C/C++ Program | Setting Linker Options | FAQ: Building Your Program