[英]Why does MSVS 2010 MFC project depend on vcredist_x86.exe for MSVS 2008?
I have an MFC project in MSVS 2010. When I compile it, MSVS generates manifest file that contains the following lines: 我在MSVS 2010中有一个MFC项目。当我编译它时,MSVS生成包含以下行的清单文件:
<assemblyIdentity publicKeyToken="1fc8b3b9a1e18e3b"
processorArchitecture="x86" version="9.0.21022.8"
name="Microsoft.VC90.CRT" type="win32"/>
As a result, I get a binary that depends on both vcredist_x86.exe for MSVS 2008 and vcredist_x86.exe for MSVS 2010, though it actually uses only vcredist_x86.exe for MSVS 2010! 因此,我得到的二进制文件依赖于MSVS 2008的vcredist_x86.exe和MSVS 2010的vcredist_x86.exe,尽管它实际上仅使用vcredist_x86.exe来实现MSVS 2010!
I tried to switch off manifest generation in project properties. 我试图在项目属性中关闭清单生成。 After it my app started to work with only vcredist_x86.exe for MSVS 2010 installed.
之后,我的应用程序开始只使用vcredist_x86.exe安装MSVS 2010。 But some controls (especially comboboxes) broke and began to be displayed incorrectly.
但是一些控件(特别是组合框)破裂并开始错误显示。 I guess this happens because windows doesn't have the following information from manifest any more:
我想这是因为windows不再有来自清单的以下信息:
<assemblyIdentity language="*" publicKeyToken="6595b64144ccf1df"
processorArchitecture="x86" version="6.0.0.0"
name="Microsoft.Windows.Common-Controls" type="win32"/>
I figured it out. 我想到了。 I had a reference to libcurl.lib which had a reference to openssl libs compiled in MSVS 2008... After rebuilding libcurl with the proper versions of openssl the reference to crt 9.0 disappeared from the manifest file.
我有一个对libcurl.lib的引用,它引用了在MSVS 2008中编译的openssl库...在使用适当版本的openssl重建libcurl之后,对清单文件的引用消失了。
Probably this happens because of the platform toolset in project properties. 可能这是因为项目属性中的平台工具集。
Change it to v100 (I suppose now it is set to v90), re-activate manifest generation and embedding (Manifest Tool\\Input and Output) and rebuild your project. 将其更改为v100(我现在假设它设置为v90),重新激活清单生成和嵌入(Manifest Tool \\ Input and Output)并重建项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.