Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

deployment

dll

qt

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\test_util.pro -r -spec win32-g++

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

like image 512
chwi Avatar asked Oct 20 '22 15:10

chwi


1 Answers

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.

like image 132
Galaxy Avatar answered Oct 24 '22 00:10

Galaxy