Qt部署;程序入口点...无法定位 [英] Qt deployment; the procedure entry point ... could not be located

查看:13
本文介绍了Qt部署;程序入口点...无法定位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经移植了一个现有的 Qt4 应用程序 Qt5 并为这个应用程序添加了一些额外的(简单的)功能.

旧应用自带

  • libgcc_s_dw2_1.dll
  • libusb-1.0.dll
  • mingwm10.dll
  • QtCore4.dll
  • QtCored4.dll
  • QtGui.dll

现在,我可以从 QtCreator 运行我修改后的应用程序,但是在准备部署时会出现问题.我在我的 .exe 上使用了 dependancy walker 并在我的可执行文件目录中包含了 DLL 的负载.

  • icudt51.dll
  • icuin51.dll
  • icuuc51.dll
  • IEShims.dll
  • libgcc_s_dw2-1.dll
  • libGLESv2.dll
  • libstdc++-6.dll
  • libusb-1.0.dll
  • libwinpthread-1.dll
  • mingwm10.dll
  • Qt5Core.dll
  • Qt5Cored.dll
  • Qt5Gui.dll
  • Qt5Guid.dll
  • Qt5Widgets.dll
  • Qt5Widgetsd.dll
  • QtCored4.dll

(是的,由于 DLL 的原因,项目大小现在非常大,但在我的用例中这不是问题.)

最后它没有抱怨缺少 DLL.尝试执行 .exe 时发布的错误消息是:

<块引用><块引用>

在动态链接库Qt5Core.dll中找不到过程入口点?testBit@QBitArray@@QBE_NH@Z

我从未尝试过在 Qt Creator 之外执行 Qt 应用程序,所以我真的不知道该怎么做.

如果有帮助:在 Projects-> qmake build config 下:Release -> Effective qmake call I have

qmake.exe D:Product	est_util.pro -r -spec win32-g++

如果需要更多信息来使任何事情更清楚,请发表评论.

解决方案

在稍微修改我的代码以添加依赖于 OpenGL 的新功能后,我在 Qt 5.4.2 上遇到了同样的问题.我所做的是使用 Qt 的 Window 部署工具.

  1. 创建一个文件夹并将二进制文件放入其中
  2. 根据您拥有的二进制文件版本,使用 cmd 发出以下命令:
    • windeployqt --release Name_Of_Binary
    • windeployqt --debug Name_Of_Binary

根据您拥有的 Qt Creator 版本,您可能需要手动将 lib*.dll 复制到该目录中.这个错误在 Qt 5.4.2 中不存在,但在早期版本中存在.

I have ported an existing Qt4 application Qt5 and added some extra (simple) functionality to this application.

The old application came with

  • libgcc_s_dw2_1.dll
  • libusb-1.0.dll
  • mingwm10.dll
  • QtCore4.dll
  • QtCored4.dll
  • QtGui.dll

Now, from QtCreator I am able to run my modified application, but problems occur when preparing deployment. I have used dependancy walker on my .exe and included a load of DLL's in my executables directory.

  • icudt51.dll
  • icuin51.dll
  • icuuc51.dll
  • IEShims.dll
  • libgcc_s_dw2-1.dll
  • libGLESv2.dll
  • libstdc++-6.dll
  • libusb-1.0.dll
  • libwinpthread-1.dll
  • mingwm10.dll
  • Qt5Core.dll
  • Qt5Cored.dll
  • Qt5Gui.dll
  • Qt5Guid.dll
  • Qt5Widgets.dll
  • Qt5Widgetsd.dll
  • QtCored4.dll

(Yes, the project size is now extremely large due to the DLL's, but in my use case this is not an issue.)

And finally it didn't complain about missing DLL's. The error message posted when trying to execute the .exe is:

The procedure entry point ?testBit@QBitArray@@QBE_NH@Z could not be located in the dynamic link library Qt5Core.dll

I have never tried executing a Qt application outside Qt Creator, so I have really no idea what to do.

If it helps: Under Projects-> qmake build config : Release -> Effective qmake call I have

qmake.exe D:Product	est_util.pro -r -spec win32-g++

If any more information is required to make anything more clear, please leave a comment about it.

解决方案

I had the same problem on Qt 5.4.2 after slightly modifying my code to add new functionality depending on OpenGL. What I did was use Qt's Window's Deployment tool.

  1. Create a folder and place your binary in it
  2. Using cmd issue the following command depending on which version of binary you have:
    • windeployqt --release Name_Of_Binary
    • windeployqt --debug Name_Of_Binary

Depending on which version of Qt Creator you have, you might have to manually copy the lib*.dll's to the directory. This bug is not present in Qt 5.4.2 but was present in earlier versions.

这篇关于Qt部署;程序入口点...无法定位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆