Notes on the release of Qt programs based on VS2005 and above (manifest questions are spoken)

Source: Internet
Author: User

Recently discovered a very annoying program deployment problem, it is estimated that everyone may also encounter, hereby memo.

The emergence of the problem I think the main or Microsoft engaged in the head too much, an unknown so-called manifest file makes the original simple program release becomes difficult. Looking for an introduction about manifest, it seems that this file is used to describe the dependencies of the program or library, especially the version that the program depends on, so that the system can find the correct version of the library through the contents of the manifest. Theoretically this dd is really good, can solve the issue of incompatible version, to ensure that the program is running with the specified version of the library. But the actual operation is troublesome.
The author of the Vs/windows programming very dishes, may understand the deviation, welcome correction. Probably also from vs2005 above version start the program compiles to this manifest request more strict? Either the manifest information can be embedded in the program, or the program will be released with the manifest file in order to ensure that the program to find the dependent external library. Qt relative to this situation also in the build system within the corresponding adjustment, the current situation is the default manifest embedded in binary, including libraries, programs and plugins.

According to the QT documentation, there are two ways to publish a QT program based on VS2005 or above, one is to publish the VC's CRT directory Microsoft.VC80.CRT to the program path, and the other is to install the VC on the target machine redistribution Package In fact, after the author's experiment, the first method does not work, the common symptom is that the program does not start according to the documentation, or the plugin cannot be loaded. Find an expert consultation, found that the problem is embedded in the manifest information. Because the QT library embeds the manifest information, the system will only go to the fixed location to find the VC's library, not search the local path at all. The author's test result is that even if the VC library is placed in the same directory as the program EXE can not find, really strange! VS2005 program has not encountered such a situation oh!

The expert gives the opinion is either installs the VC redistribution package, this is certainly can the line. Another way is to compile QT in the Pro Riga Config-=embed_manifest_dll (this point and the document seems to be the opposite, it is seen that QT documentation is fallacious.) ), compiled plug-ins also need to be in the pro Riga Config-=embed_manifest_plugin, including our program Pro to add Config-=embed_manifest_exe, so it is complete! The principle of this approach is that the program is not embedded in the version and path information, the system will follow the traditional way to search the matching library, it will be found in the path of the program or the document mentioned in the Microsoft.VC80.CRT path and so on.

You crossing who has vs2005 more than the version and encountered a similar problem can be tested, success or not to take a bubble. I do not have vs2008 to test here, but think that this plan is still more reliable.

Http://www.cnblogs.com/bingcaihuang/archive/2011/03/15/1984836.html

Notes on the release of Qt programs based on VS2005 and above (manifest questions are spoken)

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.