Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
DLL entry point problem, using the same dll's from the same path as qt creator
I know what this error is due to, and I have tried a lot of things.
I am using mingw 7.3.0 32bits, Qt 5.13.0.
I can execute the app from qt creator but not from the release or debug *.exe files. I have cuadruple checked the environment in qt creator, which is a clear environment.
In Qt Creator I have PATH="C:\Qt\Tools\mingw730_32\bin;C:\Qt\5.13.0\mingw73_32\bin;C:\Qt\Tools\mingw730_32\bin"
When I run the exe file, I get the error that a procedure entry point couldn't be found in the dll: C:\Qt\5.13.0\mingw73_32\bin\Qt5Core.dll, which is exactly the same path as the one configured in the qt creator environment.
What is wrong? Somehow when I run from qt creator, it's using another dll rather than the one configured in the environment.
Edit: It "works" with the dll's under C:\Qt\Tools\QtCreator\bin copied to the exe folder, but it says it can't find the entry point for the dll: pathtofile/file.exe
What is more, when these dll's are there, the program won't run from qt creator
@jwall141 Don't copy DLLs from QtCreator bin folder! QtCreator on Windows is built with Microsoft C++ compiler and these DLLs are not going to work with MinGW binaries.
Did you compile your app in debug or release mode?
To properly deploy a Qt app take a look at https://doc.qt.io/qt-5/windows-deployment.html
@jsulm I only did it to test, it wasn't working before.
I compiled both debug and release and neither work.
Windeployqt gives me the same problem, the dll's copied (by windeploy) to the release folder are not the right ones, or the entry points coded in the binary are wrong.
@jwall141 well yes, you'll have to use the correct windeployqt tool. There's one for each precompiled Qt Lib you installed.
And delete the old ones! It does not necessarily replace them
@j-hilk I did delete them, and I only have qt for mingw32 and mingw64. The dll's that windeploy copies are the same (at least the exact same size, i doubt different targets have the exact same size) as the ones in the mingw73_32 folder. I've searched my qt installation path for other Qt5Core.dll and the only ones are for mingw32, mingw64 and qtcreator. I searched the whole system for qt dll's and none of them are in my path. Nevertheless, as i said before, windows tells me the path of the dll that it has problems with, and it's the same as configured in the build environment.
Also the forum lets me reply only every ten minutes, sorry.
I upvoted you, so you should be able to post more regulary
can you post your windeployqt call?
C:\companyname\Pruebas\Qt\rfidTagger\release\rfidTagger.exe 32 bit, release executable
Adding Qt5Svg for qsvgicon.dll
Direct dependencies: Qt5Core Qt5Widgets
All dependencies : Qt5Core Qt5Gui Qt5Widgets
To be deployed : Qt5Core Qt5Gui Qt5Svg Qt5Widgets
Creating directory C:/companyname/Pruebas/Qt/rfidTagger/release/iconengines.
Creating directory C:/companyname/Pruebas/Qt/rfidTagger/release/imageformats.
Creating directory C:/companyname/Pruebas/Qt/rfidTagger/release/platforms.
Creating directory C:/companyname/Pruebas/Qt/rfidTagger/release/styles.
@jwall141 and the path to windeployqt? Did you add one of your Qtinstallations to your PATH?
@jwall141 Use absolute path to windeployqt to make sure you use the correct one
@jsulm I just tried that. Same issue. I think the problem is somewhere in the compiling of the exe. As i've said before, the error dialog says that it fails to find the entry point for the dll under the folder of 32bit mingw (when the dll's are not there, without running windeploy). That's the compiler I am using according to the kit, with the same version and path. I even checked if the qmake.exe used is the one in mingw folder, and it is.
@jsulm I'm currently installing version 5.12.4 to check if it works. Will update.
I'm forced to use 32 bits, since i need to use an sdk for some hardware i'm working with that comes as 32bit dlls.
Update: Same issue with 5.12.4
@jsulm half solved. Added mingw qt folder path to the system environment path (previously it was only on the user environmet). Now i can run the program outside of qt creator without any dlls in the folder.
But, when i execute the right windeployqt, the dlls that it copies are not right, i get the entry point error again
@jwall141 well, than there's only one way.
Run the deploy tool and manually replace the dlls with the correct ones.
The Deploytool should copy all needed files, even if they are from the wrong wt installation