I wrote a program in Qt:
Qt Creator 3.5.1 (opensource)
based on Qt 5.5.1 (MSVC 2013, 32 bit)
Windows 8.1 64-bit
My program is running fine in Qt creator.But I want to execute it in other computers on all Windows without installing Qt. I copied all required .dll files next to the .exe file (Release build) with windeployqt.exe.
When I start the.exe, nothing happens.
No GUI showing up, no error that a .dll is missing. But I see my application in 'ProcessExplorer'.
This happen for even very simple program.
Here's a screenshot of my Dependency Walker screen for simple application:
I had exactly the same problem and as you, I had no error message or any output whatsoever. I solved the issue when I added the QML path to my deployment.
On this page, windeployqt, you will see the commmand:
windeployqt --qmldir < path-to-app-qml-files> < path-to-app-binary>
Here the command with the qml flag.
C:\Qt\5.10.1\mingw53_32\bin\windeployqt.exe --qmldir C:\My_project C:\My_project\build-My_project_MinGW_32bit-Debug
It seems you are using QML.
did you have a look at stdout / stderr? I have had that problem when my QML file was not loadable / path was incorrect.
Also settings environment variable QML_IMPORT_TRACE=1 helped me to spot these kind of problems.
Related
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 installed Qt 5.0.1 - 32-bit Version on Ubuntu 12.04. All the programs crash at startup with the following messages :
The program has unexpectedly finished.
/home/manager/Qt5.0.1/5.0.1/gcc/examples/opengl/2dpainting-build-Desktop_Qt_5_0_1_GCC_32bit-Debug/2dpainting
exited with code 0
I tried:
Making the default Qml Application
Running a few example applications.
I switched between the debug and release modes as well, but all crashed with similar message. Surprisingly 'Animated Tiles example' works fine. Any suggestions ?
Edit:
In debug mode this is what i get:
Debugging starts
&"warning: GDB: Failed to set controlling terminal: Inappropriate ioctl for device\n"
RTTI symbol not found for class 'QGLWidget'
RTTI symbol not found for class 'QGLWidget'
RTTI symbol not found for class 'QGLWidget'
RTTI symbol not found for class 'QGLWidget'
I have same problem on Windows with Qt5. As i understood, in qt5 window subsystem moved into plugins and when application start, QApplication object can't find this libraries.
On windows I step-trace my app into Qt code, and find that plugins try to load from folder ./plugins/system where . is folder with our app binary. Also it was a problem with
dependence. Windows specific plugin dependence from libGLES.dll or libGLES2.dll. But GL libs must place in the same folder as app binary, not with plugins.
Correct file tree on Windows look like this
plugins
system
platform.dll
windows.dll
libGLES.dll
MyApp.exe
Try to look in this way.
Firstly check your graphics driver is installed.
Qt5 or higher version supports OpenGL 3.0 or higher, if your system is old one, i think you need to check the graphics card can support OPENGL verion as i mentioned above.
If above things are fine, then i think you need to install some opengl libraries that can be easily downloadable from Ubuntu.
Regards
Ansif
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 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: