无法在Windows XP中运行使用QT5和VS2013创建的应用程序
我使用无法在Windows XP中运行使用QT5和VS2013创建的应用程序,qt,visual-studio-2013,angle,msvcrt,windows-xp-sp3,Qt,Visual Studio 2013,Angle,Msvcrt,Windows Xp Sp3,我使用QT5和VisualStudio2013创建了应用程序。我还在应用程序中使用QT-WebEngine 我的应用程序在Windows7(32位)中运行良好。出于某种原因,我需要在WindowsXPSP3(32位)中运行它 当我运行它时,会出现以下错误: The procedure entry point strnlen could not be located in the dynamic link library msvcrt.dll 我按了几次OK,它就消失了,我的QMainWindo
QT5
和VisualStudio2013
创建了应用程序。我还在应用程序中使用QT-WebEngine
我的应用程序在Windows7(32位)中运行良好。出于某种原因,我需要在WindowsXPSP3(32位)中运行它
当我运行它时,会出现以下错误:
The procedure entry point strnlen could not be located in the dynamic link library msvcrt.dll
我按了几次OK
,它就消失了,我的QMainWindow
会弹出,但它是完全黑色的,我在调试器中看到了以下错误
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): Could not initialize EGL display: error 0x3001
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): When using ANGLE, check if d3dcompiler_4x.dll is available
QMainWindow
仍为黑色
,关于角度的错误与此相同
更新2
我使用以下配置为windowsxp
构建QT
configure -release -opensource -opengl desktop -target xp -platform win32-msvc2013 -angle -icu -nomake examples -prefix C:\QT-Compile
我替换了QT
依赖项并运行了我的应用程序,出现以下错误:
The application has failed to start because icuin56.dll was not found
The application has failed to start because icuuc56.dll was not found
我试图在QT
目录(C:\QT Compile)中找到它们,但我无法在运行在WindowsSeven
的主机上找到它们,我将它们放在可执行文件旁边,应用程序成功运行,但之前的错误已经消失,QMainWindow
仍然是黑色的
,我的调试器在运行时出现以下错误
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
bool __thiscall QOpenGLTextureBlitter::create(void) Could not link shader program:
现在怎么了
更新3
这就是我配置QT的方式
configure -release -opensource -opengl dynamic -target xp -platform win32-msvc2013 -icu -nomake examples -prefix C:\QT-Compile
我使用了windeployqt.exe
并放置了所需的DLL和。。。在可执行文件旁边
在windows xp中运行应用程序,我不断收到以下错误,然后应用程序崩溃
消息框:
The procedure entry point strnlen could not be located in the dynamic link library msvcrt.dll
QT调试器:
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): Could not initialize EGL display: error 0x3001
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): When using ANGLE, check if d3dcompiler_4x.dll is available
Failed to load opengl32sw.dll (The specified module could not be found.)
class QOpenGLStaticContext *__cdecl QOpenGLStaticContext::create(bool): Failed to load and resolve WGL/OpenGL functions
类QWindowsEGLStaticContext*\uU cdecl QWindowsEGLStaticContext::创建(类QFlags):无法初始化EGL显示:错误0x3001
类QWindowsEGLStaticContext*\uU cdecl QWindowsEGLStaticContext::create(类QFlags):使用角度时,检查d3dcompiler_4x.dll是否可用
加载opengl32sw.dll失败(找不到指定的模块。)
类QOpenGLStaticContext*\uU cdecl QOpenGLStaticContext::create(bool):未能加载和解析WGL/OpenGL函数
关于msvcrt.dll
的第一个错误是关于在二进制文件中不包含visual studio运行时dll。似乎在win XP机器上,这些LIB与您的应用程序链接的LIB不同
接下来的两个错误是关于无法启动角度,可能是由于您以前遇到的MS与运行时不匹配
基本上,只需将msvcr110.dll和msvcp110.dll放在您的文件夹中(或者为2013 Studio提供安装MS VS可再发行版本的方法)
以下是digia提供的详细部署文档-
另外,我建议您在部署过程中使用qt的工具windeployqt.exe。
用法很简单-windeployqt.exe路径/to/your/binary/file.exe
它将复制几乎所有你的应用程序需要运行你的应用程序在任何地方,而不会打扰你包括一些插件和DLL等(虽然它不会复制上面提到的MSVS运行时DLL)
另外,如果您对使用不同的opengl动态加载qt5构建图形驱动程序的帖子感兴趣(尝试使用默认opengl->is fails尝试使用ANGLE->如果失败,尝试使用opengl软件(libmesa))-
它比Qt4要复杂一点,但当您最终正确处理它时,即使在没有图形驱动程序、没有direct X支持或通过VPN启动的机器上,它也会更安全
更新
桌面opengl和ANGLE似乎都失败了(这意味着,您的opengl实现版本低于3.0(win xp的默认版本为2.0),桌面opengl将失败,并且您没有安装DirectX 11或DirectX 9正确的驱动程序(ANGLE将失败)
这意味着这是一个没有任何驱动程序的虚拟机或窗口。若要解决此问题,请将opengl32sw.dll(libmesa)也包含在可执行文件中。这是桌面和ANGLE都失败时的另一种回退
您可以从文件夹/tools中安装QtCreator的文件夹中获取。或者在此处下载-
取决于你的足弓
另外,尝试将win xp中的d3dcompiler_46.dll
放在可执行文件旁边。这可能会修复运行时错误,并允许启动ANGLE-
更新2:
让我们一行一行地来。
您在动态链接库msvcrt.dll中找不到过程入口点strnlen,这是因为您的win XP不是SP3而是SP2(microsoft已放弃对win XP SP2的MSVS 2013支持),因此出现了警告-存在相同问题的更多详细信息。或者存在基本上建议使用opengl软件的相同错误
现在,您在日志中看到的错误:
类QWindowsEGLStaticContext*\uU cdecl QWindowsEGLStaticContext::create(类QFlags):无法初始化EGL显示:错误0x3001
-这是OpenGL桌面的故障,因为您没有OpenGL 2.0->正确的图形驱动程序
类QWindowsEGLStaticContext*\uu cdecl QWindowsEGLStaticContext::创建(类QFlags):使用ANGLE时,请检查d3dcompiler_4x.dll是否可用
-ANGLE失败。因为-qt在MSVS 2013中使用的mvcrt.dll不再支持Win XP SP2,或者您没有d3dcompiler。它可能适用于使用MSVS 2008或MSVS 2012构建的qt 5.4
加载opengl32sw.dll失败(找不到指定的模块。)
类QOpenGLStaticContext*\uU cdecl QOpenGLStaticContext::create(bool):加载和解析WGL/OpenGL函数失败
-这些错误与缺少opengl32sw.dll
文件有关。我已经为您提供了下载并放入可执行文件的链接
而应用程序崩溃是因为Qt根本无法运行任何OpenGl模式。所以基本上你所能做的就是强迫应用程序使用OpenGl软件(我多次为你提供了如何做到这一点的链接,请
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): Could not initialize EGL display: error 0x3001
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): When using ANGLE, check if d3dcompiler_4x.dll is available
Failed to load opengl32sw.dll (The specified module could not be found.)
class QOpenGLStaticContext *__cdecl QOpenGLStaticContext::create(bool): Failed to load and resolve WGL/OpenGL functions
Could not initialize EGL display: error 0x3001
When using ANGLE, check if d3dcompiler_4x.dll is available
{
"entries": [
{
"id": 1,
"description": "Software OpenGL rasterizer (opengl32sw.dll)",
"os": {
"type": "win"
},
"vendor_id": "0x80EE",
"device_id": ["0xBEEF"],
"driver_version": {
"op": "<=",
"value": "5.1.38.22592"
},
"features": [
"disable_desktopgl", "disable_angle"
]
}
]
}