[VS] release library lib/dll with running environment (/MT, /MTd, /MD, /MDd)

Library

Release principle:

1, xxx_x86.lib, xxx_x64.lib xxx_x86.dll, xxx_x64.dll --- with operating environment (debug / non-debug)

 

The language development environment is often accompanied by a language library, which is a wrapper around the operating system's API, which we also call the runtime library.

For the MSVC runtime library (CRT), according to the static / dynamic link, can be divided into static version and dynamic version; according to debugging / release, can be divided into debug version and release version; according to single thread / multi-thread, can be divided into single thread Version and multi-threaded version (but currently no single-threaded version is available in VS)

In debug mode, use the debug runtime: multithreaded debugging (/MTd), multithreaded debugging DLL (/MDd)

In release mode, use the release runtime: multithreaded (/MT), multithreaded DLL (/MD)

Run the library with debug d in debug mode, but the release mode does not. The difference between debugging and publishing is that the publishing mode omits the debugging information of the program. Simply speaking, the content for debugging in the debugging mode is deleted, so in general, the size of the executable file generated in the publishing mode is smaller than the debugging mode. Under the generation is small

Static linking: multi-threaded (/MT), multi-threaded debugging (/MTd)

Dynamic linking: multi-threaded DLL (/MD), multi-threaded debugging DLL (/MDd)

The dynamic link is D and the static link is T. The difference between the two is that the static link integrates the runtime library that the program depends on into the executable file, and the executable file no longer needs to run the runtime; the dynamic link does not integrate the runtime library that the program depends on into the executable file. The runtime is required to run the executable. Since the static link integrates the runtime that the program depends on into the executable file, in general, the size of the generated executable file is larger than that generated by the dynamic link.

The selection of these four runtimes in the VS project properties - "C / C + + -" code generation - "running library:

Intelligent Recommendation

Qt sets the runtime library MT, MTd, MD, MDd in pro

Qt sets the runtime library MT, MTd, MD, MDd in pro, focusing onQMAKE_CFLAGS Multi-threaded debugging Dll (/MDd) corresponds to MD_DynamicDebug Multi-threaded Dll (/MD) corresponds to MD_DynamicReleas...

VC runtime library /MD, /MDd and /MT, /MTd (to convert)

Let’s summarize their differences here. The 'd' behind represents the DEBUG version, and the RELEASE version without 'd' is the RELEASE version. First of all, /MT /MT is "multithread, stati...

Multi-threaded (/ MT) VS in, multi-threaded debugging (/ MTd), the difference between multi-threaded DLL (/ MD), debugging multi-threaded DLL (/ MDd) of

A language development environment often comes with language libraries, which is the API of the operating system for the packaging, we also call these language runtime library. For MSVC runtime (CRT),...

One sheet of belt, you understand the Visual Studio: Runtime Library and MT / MTD, MD / MDD

One sheet of belt, you understand the Visual Studio: Runtime Library and MT / MTD, MD / MDD Primer What is Runtime Library? Relationship between Runtime Library and running library MT MTD MDDDDD Stati...

MT, MTd, MD, MDd explain MSVCRTD.LIB and LIBCMTD.LIB conflicts

Transfer from: The project development process encountered MSVCRTD.LIB and LIBCMTD.LIB conflicts, and later found the reason is that the code compiler compile c / c + + runtime version is not the same...

More Recommendation

Openssl windows compile 64 bit mt mtd md mdd

reference: Openssl source download address:https://www.openssl.org/source/I used openssl-1.1.0i First install ActivePerl:https://www.activestate.com/activeperl/downloadsAfter loading it, if you start ...

Reproduced - dynamic, static compiler and MD, MDd, MT, MTd compilation

As these newcomers have do not understand, read the god of explanation sobering. Great God URL: https: //blog.csdn.net/u012273127/article/details/71419499 First, the problem of lead Recently a new in ...

The difference between the compilation options /MT, /MTd, /MD, /MDd, etc.

Here is a summary of their differences. The ‘d’ at the back represents the DEBUG version, and the one without ‘d’ is the RELEASE version. First of all /MT /MT is "multithr...

CMAKE Set MSVC Engineering MT/MTD/MD/MDD

Articles directory 0. Foreword 1. How to set up 1.1 Cmakelists code 1.2 Point 1: Policy 1.3 Key points 2: set_proprty 0. Foreword existMSVCEngineeringRight-click-> Properties,turn upConfiguration a...

libcef-compile operation mode-MTD/MT-MDD/MD

Article Directory 1. Open the project 2. Modify options 3. Verification test In an embedded running environment, most of the host software may use the MD mode to load and run the C++ runtime library. ...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top