Visual c ++ Linker Options

Source: Internet
Author: User
Visual c ++ Linker Options

Link is a tool that links common object file formats (coff) object files with libraries to create executable (.exe) files or dynamic link libraries (DLL.

The following table lists the comprehensive list of link.exe options. This section also contains information about the following topics:

  • Link options controlled by the compiler

  • Link input file

  • Link output

  • Reserved Words

The linker options specified on the command line are case insensitive:/base and/base have the same meaning.

You can use comment to specify some Linker Options.

Option Purpose

@

Response File

/Align

Specifies the alignment of each section.

/Allowbind

The specified DLL cannot be bound.

/Allowisolation

Specifies the behavior of the List query.

/Assemblydebug

Add debuggableattribute to the managed image.

/Assemblylinkresource

Create a link to the managed resource.

/Assemblymodule

Specify that the Microsoft intermediate language (msil) module should be imported to the Assembly

/Assemblyresource

Embed managed resource files into an assembly

/Base

Set the base address for the program

/Clrimagetype

Set the type of the CLR image (ijw image, pure image, or security image ).

/Clrsupportlasterror

The previous error code of the function called through the P/invoke mechanism is retained.

/Clrthreadattribute

Specifies the thread attribute to be applied to the CLR program entry point.

/Clrunmanagedcodecheck

/Clrunmanagedcodecheck specifies whether the linker applies the suppressunmanagedcodesecurity attribute to the pinvoke stub (stub) generated by the linker and called from the managed code to the local DLL ).

/Debug

Create debugging information

/DEF

Pass the module definition (. Def) file to the linker

/Defaultlib

Search for the specified library when parsing external references

/Delay

Control DLL delay Loading

/Delayload

Causes delayed loading of the specified DLL

/Delaysign

Partially sign the assembly.

/DLL

Generate DLL

/Driver

Create a driver in Windows NT core Mode

/Entry

Set start address

/Errorreport

Reports internal linker errors to Microsoft.

/Export

Export Function

/Fixed

Create a program that can only be loaded at its preferred base address

/Force

Force link completion, whether or not the symbol cannot be parsed or defined multiple times

/Functionpadmin

Create a ghost repaired image.

/Heap

Set the heap size (in bytes)

/Idlout

Name of the. IDL file and other midl output files

/Ignoreidl

Prevent attribute information from being processed in. IDL files

/Implib

Override the default import database name

/Include

Force symbol reference

/Incremental

Control incremental links

/Keycontainer

Specifies the secret container used to sign the assembly.

/Keyfile

Specifies the key or key pair used to sign the assembly.

/Largeaddressaware

Notify the compiler application to support addresses larger than 2 GB

/Libpath

Allow users to rewrite the Environment library path

/Ltcg

Id generation in the specified link age

/Machine

Target Platform

/Manifest

Create a parallel list file.

/Manifestdependency

Specify the <dependentassembly> section in the configuration file.

/Manifestfile (name list file)

Change the default name of the configuration file.

/Map

Create a ing File

/MapInfo

Includes the specified information in the ing file.

/Merge

Merge Section

/Midl

Specify the midl command line option

/Noassembly

Cancel creating. NET Framework Assembly

/Nodefalib lib

Ignore all (or specified) default libraries when parsing external references

/Noentry

Create a pure resource DLL

/Nologo

Cancel displaying the start copyright mark

/Nxcompat

Mark executable files as tested compatible with Windows Data Execution Protection.

/OPT

Control link optimization

/Order

Place comdat into the image in a predetermined order

/Out

Output file name

/PDB

Create a program database (PDB) File

/Pdbstripped

Create a program database (PDB) file without private symbols

/PGD

Optimize the specified. PGD file according to the configuration file.

/Profile

Generate an output file that can be used with the performance tool probe.

/Release

Set the checksum in the. exe file header

/Safeseh

The specified image will contain the security exception handler table.

/Section

Rewrite the attributes of a section

/Stack

Set the size of the stack (in bytes)

/Stub

Attaches the MS-DOS stub (stub) program to the Win32 Program

/Subsystem

Notifies the operating system of how to run the. exe file.

/Swaprun

Notifies the operating system to copy the result to the swap file before running the linker output.

/Tlbid

Specifies the resource ID of the Type Library generated by the linker.

/Tlbout

Name of the. TLB file and other midl output files

/Tsaware

Create an application designed to run under the Terminal Server

/Verbose

Print the progress message of the linker

/Version

Assigned version number

/Wx

Treat the linker warning as an error.

For more information, see the link options controlled by the compiler.

See


Reference

FAQs about generation when setting the Linker Options

Other resources

C/C ++ generate reference http://msdn.microsoft.com/zh-cn/library/y0zzbyt4 (vs.80). aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.