简体   繁体   English

为什么MSVS 2010 MFC项目依赖于vcredist_x86.exe for MSVS 2008?

[英]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"/>
  1. Why does MSVS write a wrong version of CRT in the manifest file? 为什么MSVS在清单文件中写入错误版本的CRT?
  2. How to fix the problem/make MSVS write the correct version of CRT in the manifest file? 如何解决问题/使MSVS在清单文件中写入正确版本的CRT?

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.

相关问题 是否有小于 14 MB 的 Visual Studio 2015 C++ Redistributable (vcredist_x86.exe)? - Are there smaller Visual Studio 2015 C++ Redistributable (vcredist_x86.exe) than 14 MB? 当我在一台机器上开发EXE并在另一台机器上运行它时,为什么安装vcredist_x86.exe不会修复SideBySide错误? - Why installing vcredist_x86.exe doesn't fix SideBySide error when I develop an EXE on one machine and run it on another one? 将预先构建的Qt二进制文件用于MSVS 2008和MSVS 2010 - Using prebuilt Qt binaries for MSVS 2008 with MSVS 2010 在MSVS2010中使用静态链接库(MSVS2008) - usage of static linked library (MSVS2008) in MSVS2010 将GDAL合并到MSVS 2008 C ++项目中 - Incorporating GDAL into MSVS 2008 C++ project 在msvs2010上使用curl编译项目 - compiling project using curl on msvs2010 Api-ms-win-core-crt-l1-1-0.dll - Microsoft Visual C++ 2015 Redistributable(vc_redist.x64.exe 和 vcredist_x86.exe)无法安装 - Api-ms-win-core-crt-l1-1-0.dll - Microsoft Visual C++ 2015 Redistributable (vc_redist.x64.exe and vcredist_x86.exe) fails to install 项目范围内的其他库路径-MSVS2008 - Project-wide additional library paths — MSVS2008 移植到MSVS2010 C ++ GUI的MSVS2010 C ++控制台代码失败。 为什么? - MSVS2010 C++ Console Code Ported to MSVS2010 C++ GUI is Failing. Why? 将MSVS 2010项目转换为MSVS 2012 RC但收到错误“C ++标准不提供此类型的哈希值” - Converting MSVS 2010 project to MSVS 2012 RC but get error “The C++ standard doesn't provide a hash for this type”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM