zoukankan      html  css  js  c++  java
  • /MD, /MT, /LD (Use Run-Time Library)

    msdn

    Indicates whether a multithreaded module is a DLL and specifies retail or debug versions of the run-time library.

     
    /MD[d]
    /MT[d]
    /LD[d]
    
    Remarks              

                  
                
     

    Option

    Description

    /MD                    

    Causes the application to use the multithread-specific and DLL-specific version of the run-time library. Defines _MT and _DLL and causes the compiler to place the library name MSVCRT.lib into the .obj file.

    Applications compiled with this option are statically linked to MSVCRT.lib. This library provides a layer of code that enables the linker to resolve external references. The actual working code is contained in MSVCRversionnumber.DLL, which must be available at run time to applications linked with MSVCRT.lib.

    /MDd                    

    Defines _DEBUG, _MT, and _DLL and causes the application to use the debug multithread-specific and DLL-specific version of the run-time library. It also causes the compiler to place the library name MSVCRTD.lib into the .obj file.

    /MT                    

    Causes the application to use the multithread, static version of the run-time library. Defines _MT and causes the compiler to place the library name LIBCMT.lib into the .obj file so that the linker will use LIBCMT.lib to resolve external symbols.

    /MTd                    

    Defines _DEBUG and _MT. This option also causes the compiler to place the library name LIBCMTD.lib into the .obj file so that the linker will use LIBCMTD.lib to resolve external symbols.

    /LD                    

    Creates a DLL.

    Passes the /DLL option to the linker. The linker looks for, but does not require, a DllMain function. If you do not write a DllMain function, the linker inserts a DllMain function that returns TRUE.

    Links the DLL startup code.

    Creates an import library (.lib), if an export (.exp) file is not specified on the command line. You link the import library to applications that call your DLL.

    Interprets /Fe (Name EXE File) as naming a DLL rather than an .exe file. By default, the program name becomes basename.dll instead of basename.exe.

    Implies /MT unless you explicitly specify /MD.

    /LDd                    

    Creates a debug DLL. Defines _MT and _DEBUG.

    For more information about C run-time libraries and which libraries are used when you compile with /clr (Common Language Runtime Compilation), see CRT Library Features.

    All modules passed to a given invocation of the linker must have been compiled with the same run-time library compiler option (/MD, /MT, /LD).

    For more information about how to use the debug versions of the run-time libraries, see C Run-Time Library Reference.

    Knowledge Base article Q140584 also discusses how to choose the appropriate C run-time library.

    For more about DLLs, see DLLs in Visual C++.

    To set this compiler option in the Visual Studio development environment

    1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

    2. Expand the C/C++ folder.

    3. Select the Code Generation property page.

    4. Modify the Runtime Library property.

    To set this compiler option programmatically

  • 相关阅读:
    轻节点如何验证交易的存在
    梯度爆炸/消失与初始化参数
    归一化能够加速训练的原因
    正则化可以防止过拟合的原因
    关于周志华《机器学习》中假设空间规模大小65的计算
    linux学习0001
    目标检测算法
    opencv安装与卸载
    前端学习02
    前端学习01
  • 原文地址:https://www.cnblogs.com/chunyou128/p/3778253.html
Copyright © 2011-2022 走看看