且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法在Windows XP中使用QT5和VS2013创建的运​​行应用程序

更新时间:2022-12-02 13:22:17

关于msvcrt.dll的第一个错误是关于二进制文件中不包含Visual Studio运行时dll.看来,在Win XP机器上,这些库与您的应用所链接的库不同.

The first error about msvcrt.dll is about not including visual studio runtime dlls with your binary file. It seems that on win XP machine these libs are different then the ones your app is linked against

接下来的两个错误是有关未能启动ANGLE的,这可能是由于您先前遇到的MS VS运行时不匹配造成的.

The next two errors are about failing to start up ANGLE probably due to mismatch of MS VS runtimes that you have encountered previously.

基本上,只需将msvcr110.dll和msvcp110.dll放在您的文件夹中(或提供安装2013 Studio的MS VS Redistributable的方法)

Basically, just put msvcr110.dll and msvcp110.dll in your folder (or provide means to install MS VS Redistributable for 2013 Studio)

以下是来自digia的详细部署文档- http://doc.qt. io/qt-5/windows-deployment.html

Here is detailed deployment doc from digia - http://doc.qt.io/qt-5/windows-deployment.html

我也建议您在部署过程中使用qt的工具windeployqt.exe. 用法很简单-windeployqt.exe path/to/your/binary/file.exe

Also i would advice you to use qt's tool windeployqt.exe as a part of deploy process. Usage is simple - windeployqt.exe path/to/your/binary/file.exe

它将复制您几乎所有在任何地方运行您的应用所需的应用程序,而不会打扰您包括一些插件和dll等(尽管它不会复制上述MSVS运行时dll)

It will copy almost everything you app needs to run your app everywhere without bothering you to include some plugins and dlls etc (though it will not copy mentioned above MSVS runtime dlls)

此外,如果您对使用不同的opengl用于动态加载图形驱动程序的qt5构建感兴趣的帖子(尝试使用默认的opengl->尝试使用ANGLE失败->如果失败,请尝试使用opengl软件(libmesa)) - http://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers

Also if you are interested a post about using different opengl for qt5 built dynamically loading of graphical drivers ( tries to use default opengl -> is fails tries to use ANGLE -> if fails, tries to use opengl software (libmesa) ) - http://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers

与Qt4相比,它要复杂一些,但是当您最终正确地处理它时,即使在没有图形驱动程序,没有直接X支持或通过VPN启动的机器上,它也将具有更高的故障保护能力

It's a bit more complicated then in Qt4, but when you finally handle it properly, it will be more fail safe even on machines with no graphical drivers or no direct X support or launched through VPN

更新

似乎桌面opengl和ANGLE都对您失败(这意味着您的OpenGL实现版本低于3.0(win xp的默认设置为2.0)),导致桌面opengl失败并且您没有DirectX 11或已安装DirectX 9正确的驱动程序(以使ANGLE失败).

It seems that both desktop opengl and ANGLE fails for you (which would mean, that you have OpenGL implementation version less then 3.0 (default on win xp has 2.0) for desktop opengl to fail and you don't have DirectX 11 or DirectX 9 correct drivers installed (for ANGLE to fail).

这意味着这是虚拟机或没有任何驱动程序的窗口.要解决此问题,请在可执行文件中同时包含opengl32sw.dll(libmesa).如果台式机和ANGLE都失败了,这是又一个后备方法.

This would mean that this is either virtual machine or window without any drivers. To fix this issue, please include opengl32sw.dll (libmesa) to you executable file as well. This is another fallback in case both desktop and ANGLE failed.

您可以从QtCreator安装在/tools文件夹中的文件夹中接收.或在此处下载- http://download.qt.io/development_releases/prebuilt/llvmpipe/windows/ 取决于您的拱门.

You can take in from the folder where your QtCreator installed in folder /tools. Or download it here - http://download.qt.io/development_releases/prebuilt/llvmpipe/windows/ depending on your arch.

此外,尝试将Win XP中的d3dcompiler_46.dll放在可执行文件旁边.这可能会修复运行时错误,并将允许启动ANGLE- https://bugreports .qt.io/plugins/servlet/mobile#issue/QTBUG-44985

Also, try to put d3dcompiler_46.dll from your win xp next to your executable. This might fix runtime error and will allow to launch ANGLE - https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-44985

更新2:

让我们逐行获取它. 您收到The procedure entry point strnlen could not be located in the dynamic link library msvcrt.dll警告,是因为您拥有的Windows XP的操作系统不是SP3而是SP2(Microsoft放弃了对MSVS 2013的Win XP SP2的支持)-更多详细信息此处中存在相同的错误,基本上可以建议使用opengl软件.

Let's get it line by line. You've got The procedure entry point strnlen could not be located in the dynamic link library msvcrt.dll warning because of either you have win XP with not SP3 but SP2 (microsoft dropped support for win XP SP2 for MSVS 2013) - more details here where there is the same issue. Or there is the same bug here that would basically advice to use opengl software.

现在,您在日志中看到的错误:

Now, the errors you see in log:

  1. class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): Could not initialize EGL display: error 0x3001-这是OpenGL桌面的故障,因为您没有Open GL 2.0->适当的图形驱动程序.

  1. class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): Could not initialize EGL display: error 0x3001 - this is failure of OpenGL desktop, since you don't have Open GL 2.0 -> proper graphical driver.

class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): When using ANGLE, check if d3dcompiler_4x.dll is available-角度失败.因为-Qt将mvcrt.dll用于不再支持Win XP SP2的MSVS 2013,或者您没有d3dcompiler.也许它将与使用MSVS 2008或MSVS 2012构建的Qt 5.4一起使用.

class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(class QFlags<enum QWindowsOpenGLTester::Renderer>): When using ANGLE, check if d3dcompiler_4x.dll is available - ANGLE is failed. Because either - qt uses mvcrt.dll for MSVS 2013 that does not support your Win XP SP2 anymore or you don't have d3dcompiler. Perhaps it will work with Qt 5.4 built with MSVS 2008 or MSVS 2012.

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-这些错误与丢失的opengl32sw.dll文件有关.我已经提供了链接供您下载并置于可执行文件中.

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 - These errors relates to missing opengl32sw.dll file. Which i've already provided link for you to download and put to executable.

应用崩溃,因为Qt根本无法运行任何OpenGl模式.因此,基本上,您所能做的就是强迫应用程序使用OpenGL软件(我已为您提供了多次操作链接,请阅读那些指南.)或使用qt 5.4并尝试成角度运行. OpenGL软件可能无法流畅运行,并且在复杂的图形界面上存在一些问题,但这基本上是唯一剩下的东西.

And app crashes because Qt was not able to run any of OpenGl modes at all. So basically all you can do is force app to use OpenGL software (i provided link for you how to do this numerous times, please read those guide.) or use qt 5.4 and try to run angle. OpenGL software may not run smoothly and have some problems with complex graphical interfaces but this is basically the only thing that is left.