Microsoft (R) Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
usage: LINK [options] [files] [@commandfile]
options:
/ALIGN:#
/ALLOWBIND[:NO]
/ALLOWISOLATION[:NO]
/ASSEMBLYDEBUG[:DISABLE]
/ASSEMBLYLINKRESOURCE:filename
/ASSEMBLYMODULE:filename
/ASSEMBLYRESOURCE:filename[,[name][,PRIVATE]]
/BASE:{address[,size]|@filename,key}
/CLRIMAGETYPE:{IJW|PURE|SAFE}
/CLRSUPPORTLASTERROR[:{NO|SYSTEMDLL}]
/CLRTHREADATTRIBUTE:{STA|MTA|NONE}
/CLRUNMANAGEDCODECHECK[:NO]
/DEBUG
/DEF:filename
/DEFAULTLIB:library
/DELAY:{NOBIND|UNLOAD}
/DELAYLOAD:dll
/DELAYSIGN[:NO]
/DLL
/DRIVER[:{UPONLY|WDM}]
/ENTRY:symbol
/ERRORREPORT:{NONE|PROMPT|QUEUE|SEND}
/EXPORT:symbol
/FIXED[:NO]
/FORCE[:{MULTIPLE|UNRESOLVED}]
/FUNCTIONPADMIN[:size]
/HEAP:reserve[,commit]
/IDLOUT:filename
/IGNOREIDL
/IMPLIB:filename
/INCLUDE:symbol
/INCREMENTAL[:NO]
/KEYCONTAINER:name
/KEYFILE:filename
/LARGEADDRESSAWARE[:NO]
/LIBPATH:dir
/LTCG[:{NOSTATUS|PGINSTRUMENT|PGOPTIMIZE|PGUPDATE|STATUS}]
/MACHINE:{ARM|EBC|IA64|MIPS|MIPS16|MIPSFPU|MIPSFPU16|
SH4|THUMB|X64|X86}
/MANIFEST[:NO]
/MANIFESTDEPENDENCY:manifest dependency
/MANIFESTFILE:filename
/MAP[:filename]
/MAPINFO:{EXPORTS}
/MERGE:from=to
/MIDL:@commandfile
/NOASSEMBLY
/NODEFAULTLIB[:library]
/NOENTRY
/NOLOGO
/NXCOMPAT[:NO]
/OPT:{ICF[=iterations]|NOICF|NOREF|NOWIN98|REF|WIN98}
/ORDER:@filename
/OUT:filename
/PDB:filename
/PDBSTRIPPED:filename
/PGD:filename
/PROFILE
/RELEASE
/SAFESEH[:NO]
/SECTION:name,[[!]{DEKPRSW}][,ALIGN=#]
/STACK:reserve[,commit]
/STUB:filename
/SUBSYSTEM:{CONSOLE|EFI_APPLICATION|EFI_BOOT_SERVICE_DRIVER|
EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|POSIX|WINDOWS|
WINDOWSCE}[,#[.##]]
/SWAPRUN:{CD|NET}
/TLBID:#
/TLBOUT:filename
/TSAWARE[:NO]
/VERBOSE[:{ICF|LIB|REF|SAFESEH}]
/VERSION:#[.#]
/WINDOWSCE:{CONVERT|EMULATION}
/WX[:NO]
/ENTRY:function
where:
The /ENTRY option specifies a function as the starting address for an .exe file or DLL.
The function must be defined with the __stdcall calling convention. The parameters and return value must be defined as documented in the Win32 API for WinMain (for an .exe file) or DllEntryPoint (for a DLL). It is recommended that you let the linker set the entry point so that the C run-time library is initialized correctly, and C++ constructors for static objects are executed.
By default, the starting address is a function name from the C run-time library. The linker selects it according to the attributes of the program, as shown in the following table.
| Function name | Default for |
|---|---|
| mainCRTStartup (or wmainCRTStartup) | An application using /SUBSYSTEM:CONSOLE; calls main (or wmain) |
| WinMainCRTStartup (or wWinMainCRTStartup) | An application using /SUBSYSTEM:WINDOWS; calls WinMain (or wWinMain), which must be defined with __stdcall |
| _DllMainCRTStartup | A DLL; calls DllMain, which must be defined with __stdcall, if it exists |
If the /DLL or /SUBSYSTEM option is not specified, the linker selects a subsystem and entry point depending on whether main or WinMain is defined.
The functions main, WinMain, and DllMain are the three forms of the user-defined entry point.
When creating a managed image, the function specified with /ENTRY must have a signature of (LPVOID var1, DWORD var2, LPVOID var3).
To set this linker option in the Visual Studio development environment
To set this linker option programmatically
By default, the linker runs in incremental mode.
To override a default incremental link, specify /INCREMENTAL:NO.
An incrementally linked program is functionally equivalent to a program that is
nonincrementally linked.
However, because it is prepared for subsequent incremental links, an incrementally linked executable (.exe) file or dynamic-link library (DLL):
Is larger than a nonincrementally linked program because of padding of code and data. (Padding allows the linker to increase the size of functions and data without recreating the .exe file.)
May contain jump thunks to handle relocation of functions to new addresses.
Note To ensure that your final release build does not contain padding or thunks, link your program nonincrementally.
To link incrementally regardless of the default, specify /INCREMENTAL. When this option is selected, the linker issues a warning if it cannot link incrementally, and then links the program nonincrementally.
Certain options and situations override /INCREMENTAL.
Most programs can be linked incrementally.
However, some changes are too great, and some options are incompatible with incremental linking. LINK performs a full link if any of the following options are specified:
Additionally, LINK performs a full link if any of the following situations occur: