I have a problem with my qt deployment under windows 10. I'm using QtCreator 4.5.1 and Qt 5.11 on Windows 10. I execute my application in release mode. Then I open the command line by running Qt5.11.0 for Desktop(MinGw 5.3.0 32 bit). There I give the path of the release folder (where my exe file exists):
C:\Qt\workspace\build-CanSaveLog2FilterError2DataExploreClass6-Desktop_Qt_5_11_0_MinGW_32bit2-Release\release
After that I type this line:
windeployqt.exe --quick .
and all the necessary .dll files and platforms and plugins will be generated.
When I do this to a simple qt project, it works fine and my exe file can be executed correctly. Whereas when I do the same to my desired project, I can't execute my exe file and I get this error:
This application failed to start because it could not load the Qt platform plugin "windows"
in "", even though it was found. This is usually due to missing dependencies which you can find by setting the env variable QT_DEBUG_PLUGINS to 1.
Available platform plugins are: windows.
Reinstalling the application may fix this problem.
I tried to find dll file by executing it in dependency walker. When I did this, it showed a lot of dll files missing such as "API-MS-WIN-EVENTING-CONTROLLER-L1-1-0.DLL" which doesn't exist even in bin folder of mingw. While if I put the exe file in the bin folder of mingw it works fine.
So I tried to find all the main dll files whose their sub dll files were missing and copied them to the release folder. For example for API-MS-WIN-EVENTING-CONTROLLER-L1-1-0.DLL, I copied Qt5core.DLL to the release folder. But it didn't work again.
I can't understand where the problem is. Could you please help me to resolve it? Since yesterday morning I'm searching and can't find the solution.
Related
Error when run FBLTool_0224.exe
I guess you double-clicked in exe file that provides after building in release mode :
For Deploy and create Exe output with QT in windows you should follow this way:
put your compiler path in your system path. now you use mingw81_64 you should set it. something like Qt/tools/mingw81_64/bin
copy exe file that provides after building in release mode in one folder and run mingw81_64 cmd (it has separate cmd)
and cd to that folder path
windeployqt app.exe
This command will get all dll needs for your app and your exe will work .
if you use qml
windeployqt --qmldir (the path of its directory ) app.exe
and also see these youtube videos for more info:
https://www.youtube.com/watch?v=LdSTgR0xJco
https://www.youtube.com/watch?v=hCXAgB6y8eA
installing visual C++ 2010 runtime x86 solved problem
Am trying to compile project found at uconfig, I managed to compile the application successfully using 32bit version mingw, yet when I run the .exe I get this error The application was unable to start correctly (0xc000007b), I moved all the required DLLs required to exe path but still getting same error,
on the other hand, the application starts in debug mode in Qt creator normally
After searching ... the reason was I had another verion x64 of Qt installed and /bin was added to system path. this resulted in conflict between DLLs generated from Qt and ones found in the System path
I fixed the same problem by running them as adminstrator (properties/compatability/Run as Admin)
I am trying to build an QT application with version 5.4.
and when ever I am trying to run the exe on a different machine where QT is not installed I am getting below error "The program cannot start because QT5core.dll is missing from your computer, Try reinstalling the program to fix this problem".
and when I copied QT5core.dll with the exe in a machine where QT is not installed its working fine.
Is there any way that I can link QT5core.dll with the exe statically so that whatever place I run this exe it should not ask for any dll.
Thanks,
Tushar
You can build a standalone version of your Qt application so that it doesn't have any library dependencies at runtime. Be warned though: this can greatly expand the size of the .exe generated and the compilation time. Have a look here:
https://wiki.qt.io/Build_Standalone_Qt_Application_for_Windows
and here:
https://wiki.qt.io/How_to_build_a_static_Qt_version_for_Windows_with_gcc
I have Qt 4.8.1 installed on a windows 7 64 bit OS. I am using opencv and Qt together for my project.
For opencv dll's i gave the necessary path and everything in .pro. Everything was working fine until yesterday.
My code gets compiled successfully, but now when i run, it says that abc.exe executed with code -1073741511.
When I manually run the .exe file from debug or release folder it says that some entry point could not be located in QtCore4.dll.
I tried everything, from setting the Qt & opencv Dlls in %PATH% environment variable to copy and pasting the dlls to the same folder to that of .exe
i hav seen the .exe through dependency walker also and it shows me red color in Link checksum field of QtCore4.dll.
Can anybody help me on this?????
Make sure you are not using (by using i mean copy/add to path) a wrong dll, i mean a dll that was built with a different compiler, example the default (MinGW version) SDK has two versions of QtCore.dll: the correct one (built with MinGW): QT_INSTALL_PATH/qt/bin and one built with some version of VS: QT_INSTALL_PATH/bin (this one is used by Creator and other tools)
I have Qt 4.6.3 installed at C:\Qt\4.6.3 (Windows).
I just compiled a Qt application and went to run the EXE. When double-clicking on the executable, saw an error message:
"This application has failed to start because QtXmld4.dll was not found. Re-installing the application may fix this problem."
Found QtXmld4.dll in C:\Qt\4.6.3\lib. When copying this file into the same directory as the executable, I no longer see this error, but instead the same error for the Qt core DLL.
Is there an environment variable I should have set so these libraries are found?
Current Qt environment variables:
Path = C:\Qt\4.6.3\lib;C:\Qt\4.6.3\bin;C:\Qt\4.6.3\include;%PATH%
QMAKESPEC = C:\Qt\4.6.3\mkspecs\win32-g++
QTDIR = C:\Qt\4.6.3
QTLIB = C:\Qt\4.6.3\lib
TIA
You need to make sure that C:\Qt\4.6.3\lib is on your system path environment variable.
The initial problem was solved because the dll is now local, but that dll obviously references QtCore.dll which will be in the same folder.
Did you restart your machine after installing Qt? It could have updated the path, but it would only take effect after the next restart.