Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

dll - Qt deployment; the procedure entry point ... could not be located

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:Productest_util.pro -r -spec win32-g++

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...