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.
Related
I have a problem that I cannot solve, When I run the executable of my program it gives me the following error:
The code executable cannot continue because libgcc_s_seh-1.dll was not found. To fix the problem, try reinstalling the program
I tried to manually copy and paste the file (libgcc_s_seh-1.dll) into the folder where I keep the executable but I get the following error:
The application could not be started correctly (0xc000007b)
Additional information:
I use windows 10 64 bit
I Use mingw81_64
I use version 6.1.2 of Qt
What can I solve the problem?
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
For specific error of libgcc_s_seh-1.dll was not found, please try to copy libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll into your compiler path like Qt/tools/mingw81_64/bin.
You should copy libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll into your exefile path after executing windeployqt.exe with all files are in correct version.
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 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.
I have compiled qt in to /home/user/Software/qt-4.7.4 folder. Then Iset the path in .profile. I did the static built before to /home/user/Software/qt-4.7.4-static-build. For some reason even after updating the PATH env variable it is not changed to the new path and keep giving me the old qmake version.
I tried source command but it does help, also when I try qmake -version it shows me the old path. if I try qmake in a qt project obviously it gives me
QMAKESPEC has not been set, so configuration cannot be deduced.
Error processing project file: /home/user/testUI.pro
can someone help me to get qt running. I am using ubuntu linux 10.04 and
I think you have to update both the QT and QTMAKESPEC environment variables.
Alight After some head banging and consulting a few people I figured the solution my self. What I forget to mention was that I changed the name of the qt installation folder which is a BIG NO NO. Apparently qmake stores its path statically rather than using the path variable.
I have just purchased a Macbook (yes I am a complete noob on Mac though I have some considerable experience with Linux) and I'm trying to build my Qt application on it. I have installed XCode and the Qt SDK but when I try to build my project on Qt Creator all I get is the following error during qmake:
Running build steps for project TimeTracker...
Starting: "/usr/bin/qmake" /Users/raphaelcruzeiro/Documents/Projects/Timely/Widget/TimeTracker/TimeTracker.pro -r -spec macx-g++
Failure to open file: /Developer/Applications/Qt/Makefile
Unable to generate makefile for: /Users/raphaelcruzeiro/Documents/Projects/Timely/Widget/TimeTracker/TimeTracker.pro
The process "/usr/bin/qmake" exited with code %2.
Error while building project TimeTracker (target: Desktop)
When executing build step 'qmake'
Any ideas on what is going on? /Developer/Applications/Qt/Makefile indeed does not exist.
EDIT:
Ok, I know what is going on but I don't know how to fix it. When I ran qmake from the terminal everything went just fine. I believe that Qt Creator is trying to build my application on the Qt directory itself and it does nt have permission for it (it shouldn't anyway).
How do I tell Qt Creator where to build my application? I didn't find it anywhere and setting the DESTDIR variable isn't helping.
THE SOLUTION:
Deleting the .pro.user file made Qt Creator build the application to the directory specified in DESTDIR
THE SOLUTION:
Deleting the .pro.user file made Qt Creator build the application to the directory specified in DESTDIR
I was battling with the same thing. What helped eventually was resetting the default build directory here: