VC compilation options/MT/MTD/MD/MDD

Source: Internet
Author: User

Option Description

/MD

Make the application use the multi-thread of the Runtime Library and the DLL-specific version. Definition_ MtAnd_ DLLAnd make the compiler put the library name msvcrt. Lib into the. OBJ file.

The application compiled with this option is statically linked to msvcrt. Lib. This library provides a code layer that allows the linker to parse external references. The actual working code is included in msvcr80.dll. This library must be available for applications linked to msvcrt. Lib at runtime.

When_ Static_cpplib(/D_static_cpplib)./MDIt will lead to applications and static multi-threaded Standard C ++ Library (libcpmt. lib) instead of the dynamic version (msvcprt. lib) Link, still through msvcrt. lib is dynamically linked to the master CRT.

/MDD

Definition_ Debug,_ MtAnd_ DLLAnd the application uses the multi-thread debugging of the Runtime Library and is specific to the dll version. It also enables the compiler to put the library name msvcrtd. Lib into the. OBJ file.

/Mt

Make the application use the multi-threaded static version of The Runtime Library. Definition_ MtThe compiler puts the library name libcmt. Lib into the. OBJ file so that the linker can use libcmt. lib to parse external symbols.

/MTD

Definition_ DebugAnd_ Mt. This option also enables the compiler to put the library name libcmtd. Lib into the. OBJ file so that the linker can use libcmtd. lib to parse external symbols.

/LD

Create a DLL.

Pass the/DLL option to the linker. Find the linkerDllmainFunction, but this function is not required. If noDllmainFunction. The linker insertsDllmainFunction.

Link DLL startup code.

If the Export (. exp) file is not specified on the command line, create the import/export (. Lib); link the import/export link to the application that calls your DLL.

The/Fe (named EXE file) is interpreted as the Named DLL instead of the. exe file; the default program name isBasename. Dll instead
Basename. EXE.

Unless explicitly specified/MDOtherwise, it indicates/Mt.

/LDD

Create a debug DLL. Definition_ MtAnd_ Debug.


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.