2012-01-05 131 views
0

我在Visual Studio 2008中运行的Qt的C++项目,我得到这个错误信息:我跑在Visual Studio中的Qt C++项目,并得到了“程序无法启动,因为QtCored4.dll”缺少

"The program can't start because QtCored.dll is missing from your computer. Try installing the program to fix this problem". 

然后我复制:QtCored4.dll从C:\的Qt \ 4.8.0 \ bin添加到EXE程序

我再次运行它,我得到:

"The program can't start because QtGuid4.dll is missing from your computer. Try installing the program to fix this problem". 

然后我复制:QtGuid4.dll从C:\ Qt \ 4.8.0 \ bin到exe程序

然后我再次运行它,我得到:

"the application was unable to start correctly (0xc015002). Click OK to close the program. 

然后我检查事件查看器,我看到:

激活上下文生成失败的“d:\休息\ rrpT。可执行程序”。依赖 程序集 Microsoft.VC80.DebugCRT,processorArchitecture =“x86”,publicKeyToken =“1fc8b3b9a1e18e3b”,type =“win32”,version =“8.0.50727.762” 无法找到。请使用sxstrace.exe进行详细诊断。

首先,我很奇怪,因为我正在VS2008上构建和调试应用程序,但它要求VS2005的dll文件。然后我复制这些文件从VS2005:

msvcm80d.dll - msvcp80d.dll - msvcr80d.dll

的程序文件夹,但它仍然是同样的错误:(

而且我认为也有一些有趣的事情:

Activation context generation failed for "C:\Bin\QtSolutions_PropertyBrowser-2.5d.dll". Dependent Assembly Microsoft.VC80.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762" could not be found. Please use sxstrace.exe for detailed diagnosis. 

这是为什么PropertyBrowser依赖于VS2005

任何想法

+0

您是否尝试过使用并行(SxStrace)实用工具?该消息显然认为你可以从中得到更好的错误,所以这是值得一试的。 – ssube 2012-01-06 08:27:54

+0

我试过sxstrace,但解析给出了错误。我查看事件日志并找到了上面的信息。 – olidev 2012-01-06 08:58:04

回答

1

听起来你的Qt副本是用VS2005编译的,因此它可能依赖于版本8运行时DLL。但是,您的应用程序是使用VS2008构建的,因此依赖于版本9运行时DLL。通常,您无法将两个版本的运行时DLL合并到一个进程中。 VC++往往会破坏主要版本之间的二进制兼容性。

您需要使用VS2008重新编译自己的Qt DLL副本或使用VS2005开发您的应用程序。

+0

FWIW,我从来不需要重新编译QT dll来与VS2008一起工作。事实上,QT下载页面只有vs2008库,而不是vs2005 http://qt.nokia.com/downloads – Alan 2012-01-05 17:20:16

+0

我添加了一些问题。它会成为VS2005的原因吗? – olidev 2012-01-06 08:09:57

相关问题