Microsoft Visual Studio developed C + + program software release related matters

Source: Internet
Author: User

vs2005/vs2008 Software Release:

Debug Version:

Non-MFC programs:

Compile option MDD:

Depending on the C + + library and the C run-time library only, you will need to locate the Microsoft.VC90.DebugCRT directory in the vs2005/vs2008 directory vc/redist/debug_nonredist, where the manifest file *. The content in manifest is dependent on the library file Msvcp90d.dll and Msvcr90d.dll, the former is a C + + library, which is the C run-time library In addition, there is also a Msvcm90d.dll library, which is generally used in the project; for manifest files, if the production EXE in the VS configuration attribute is not embedded in the manifest file (under Project properties, input and in the Manifest Tools list tool If the output can be configured to embed EXE), the runtime will need to provide the above manifest files and dependent library files separately, otherwise only need to provide the corresponding dependent library files;

If your program relies on third-party dynamic libraries, you will also need to provide dependent third-party library files.

In addition, the target machine is required to have a msvcrtd.dll library;

Compilation Options MTD:

You do not need to rely on C + + libraries and C run-time libraries, because they are statically connected to the EXE, that is, statically connected LIBCMTD.lib (located in the Vc/lib directory);

In addition, if a program relies on a third-party library, you also need to provide a dependent third-party library file (regardless of the dynamic library or static library) (in general it is recommended that you choose the same compilation option, and different compilation options may cause compilation conflicts).

MFC Program:

When you dynamically link to the MFC library:

In addition to the above-mentioned non-MFC in different compilation options, but also need to provide the following corresponding to MFC support library files;

To vs2005/vs2008 under install directory vc/redist/debug_nonredist, locate the Microsoft.VC90.DebugMFC directory where the manifest file *. The content in manifest is dependent on the library file Mfc90d.dll, Mfccm90d.dll and the corresponding Unicode version depends on the library file; the same for the manifest file, if the production EXE in the VS configuration attribute is not embedded in the manifest file, the runtime needs to provide the above manifest file and dependent library file separately, otherwise only need to provide the corresponding dependent library file;

When you statically link to the MFC library:

It is no longer necessary to provide the above inventory files and dependent libraries, only the above non-MFC under different compilation options under the circumstances can be;

Release version:

Non-MFC programs:

Compilation Options MD:

Depending on the C + + library and the C run-time library only, you will need to find the Microsoft.VC90.CRT directory, the manifest file * in the vs2005/vs2008 directory vc/redist/x86 or AMD64. The content in manifest is dependent on the library file Msvcp90.dll and Msvcr90.dll, the former is a C + + library, which is the C run-time library In addition, there is a msvcm90.dll library, which is generally used in the project; for manifest files, if the production EXE in the VS configuration attribute is not embedded in the manifest file, the runtime needs to provide the above manifest file and dependent library file separately, otherwise only need to provide the corresponding dependent library file;

If your program relies on third-party dynamic libraries, you will also need to provide dependent third-party library files.

In addition, the target machine is required to have a Msvcrt.dll library;

Compilation Options MT:

You do not need to rely on C + + libraries and C run-time libraries, because they are statically connected to the EXE, that is, statically connected LIBCMT.lib (located in the Vc/lib directory);

In addition, if a program relies on a third-party library, you also need to provide a dependent third-party library file (regardless of the dynamic library or static library) (in general it is recommended that you choose the same compilation option, and different compilation options may cause compilation conflicts).

MFC Program:

When you dynamically link to the MFC library:

In addition to the above-mentioned non-MFC in different compilation options, but also need to provide the following corresponding to MFC support library files;

To vs2005/vs2008 under install directory vc/redist/x86 or AMD64, locate the Microsoft.VC90.MFC directory where the contents of the manifest file *.manifest correspond to the library file Mfc90.dll, Mfccm90.dll and the corresponding Unicode version depends on the library file; the same for the manifest file, if the production EXE in the VS configuration attribute is not embedded in the manifest file, the runtime needs to provide the above manifest file and dependent library file separately, otherwise only need to provide the corresponding dependent library file;

When you statically link to the MFC library:

It is no longer necessary to provide the above inventory files and dependent libraries, only the above non-MFC under different compilation options under the circumstances can be;

In addition to the above, for the release version, you can also install the corresponding version of Vcredist (a set of VC + + application needs of the library of components (in fact, the need to protect the release of the various dependent libraries)), note that Vcredist is divided into 32 and 64-bit version, Also note that VS2008 and VS2008 SP1 when the vcredist version is different, you should install the corresponding version according to the application situation;

In some cases, if the VS2008 SP1 under development, at this time the above manifest file and dependent library or vcredist need to provide a corresponding version;

VS2010 and later later, the manifest file is no longer available, but if the application relies on a library or target file (obj) developed by vs2005 or VS2008, the manifest file for the manifest or the embedded EXE and the corresponding VS2005 or VS2008 run-time dependent library are still required ( C++/C with the runtime library, if the MFC library will also need the corresponding MFC dependency library), although the VS2010 and later advanced version of the development of libraries or EXE can no longer provide the manifest file, but still rely on the corresponding runtime library;

When you package a program, either debug or release (typically packaged as release release), you can combine the dependency mentioned in the "Development tools" article Walker and Sxstrace Tools view programs that rely on libraries or other dependent third-party libraries, or log information when they run exceptions, to gradually resolve dependency problems or other anomalies; You can also use the installation and deployment tools provided with VS to package the integration net Framework runtime libraries, etc. (good handling, packaging of each dependent library or runtime environment), and NSIs or other third-party packaging tools can be used;

Briefly:

If the compilation option is MT/MTD, you do not need to provide C++/C runtime library dependencies;

If you compile the connection static Library to MFC, then you do not need to provide the runtime library dependency of MFC;

The prerequisite is that EXE and all of its dependent libraries do not rely on any runtime library, if there is a dependency, then the application will rely on the corresponding runtime library;

To avoid compilation conflicts, all developed libraries or dependent libraries should uniformly use one of the compilation options CRT runtime dependencies;

Microsoft Visual Studio developed C + + program software release related matters

Related Article

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.