使用来自 qt (http://get.qt.nokia.com/qt/source/qt-win-opensource-4.7.1-vs2008.exe) 的可下载 exe 似乎不适用于 Visual Studio 2010。我尝试构建来自命令行的一个简单的 hello world 程序,它不会运行。我将重复我对先前答案的评论。
我尝试了来自 doc.qt.nokia.com/4.7/gettingstartedqt.html 的 hello world 示例。我能够构建项目并生成一个 exe。但是,exe 无法运行并生成有关“并行配置不正确...”的系统错误对话框。我运行了 SxsTrace,它说:
...
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\ 9.0.21022.8__...\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86", publicKeyToken="...",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.
对我来说,它看起来像是在尝试使用 VS2008(我没有)。我想这是有道理的,因为下载是针对 VS2008 的。
当我问这个 SO 问题并且编译完成时,我正在使用我的问题中的说明(但是使用 win32-msvc2010 作为我的平台目标)编译 qt 4.7.1。我重建了 hello world 项目并运行了 exe。因此,似乎答案是为了与 Visual Studio Express 2010 一起使用,您当前确实需要编译(至少在 Qt 发布 VS2010 下载选项之前)。但是,我相信如果您使用的是 VS2008,那么您将不需要编译。