I'm using Qt Creator on Windows XP SP3. I want to develop C++ desktop applications.
I made a new project. Everytime I click build, it appears a window which says:
qmake.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
In Qt Creator, something similar to this appears:
20:36:55: Running build steps for project yyy...
20:36:55: Starting: "d:\qtsdk\desktop\qt\4.8.1\mingw\bin\qmake.exe" D:\...\yyy.pro -r -spec win32-g++ "CONFIG+=declarative_debug"
20:38:00: The process "d:\qtsdk\desktop\qt\4.8.1\mingw\bin\qmake.exe" crashed.
Error while building project yyy (target: Desktop)
When executing build step 'qmake'
I can't build, I have reinstalled the software but it keeps giving the same error.
Can you give me any idea of what is happening?
Running the qmake command from the command line via a bat file works.
Related
I am currently using QT creator 4.62. I created a widgets application and I did a test run. The output log displayed:
22:41:39: Could not determine which "make" command to run. Check the "make" step in the build configuration.
When I downloaded QT, I pre-installed minGW 5.30 in tools. I also checked Tools >> Options >> Build and run. It autodetected MinGW 5.3.0 for c++ which should work.
Here are some photos of my problem:
Compiler Setup
The problem
The kits tab:
I'm trying to run qt-creator and for some inexplicable reason, when I try to build a project, I receive this error message:
Could not start process "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" /home/user/simple-project/simple-project.pro -r -spec linux-g++-64 CONFIG+=declarative_debug CONFIG=qml_debug
Yet, when I run qmake with the above arguments, it runs just fine.
To add to this confusion, I have another computer that I tried this on, and qmake actually builds and compiles within qtcreator for this other computer, with no error messages, despite the fact that the configuration is identical to the configuration of the project on the computer that it does not work on. Any help would be much appreciated.
Both are running within the Windows Subsystem Linux(Ubuntu Trusty) with XMing.
I've got a Qt Creator project that I need to run as root, and which I need to debug. Root debugging is apparently difficult and unreliable in Qt Creator, so I used qmake with -spec macx-xcode to generate an xcode project, hoping to debug in xcode instead.
I had to change C++ standard library to libstdc++ to get it to link, but otherwise it builds and runs fine.
However, no breakpoints are hit and the Debug Navigator says "No Debug Session" while the program is running. Attempting to attach to the process when it's already running just makes xcode say "Finished running $my_app" and does not attach, though the process is still running.
I suspect I'm trying to debug a release build. Can anyone tell me what I need to do with qmake to generate a debuggable xcode project? Or what I need to do in xcode to get debugging working?
I'm new to OSX and Qt, as you may have guessed.
(This is on OS X 10.8.5, XCode 5.1.1, Qt 4.8.6)
EDIT: the command I'm using to get qmake to generate the xcodeproj is: "/opt/Qt-4.8.6/bin/qmake" ~/path_to_proj/qtproj.pro -r -spec macx-xcode CONFIG+=x86_64
EDIT 2: The source Qt Creator project builds debug and release configurations correctly.
I'd like to run my Qt application as a standalone executable. I know that I have to configure Qt to build static applications to do this and have added the line of code for this to my .pro file but I cannot get the Qt command prompt to work in order to complete the configuration.
The command prompt mentions I need to call vcvarsall.bat to complete environment setup. Could I get some pointers on how to get this batch file to run and what other steps I need to complete to build static applications. I'm using version 5.3 and the compiler is MSVC 2012.
Edit: I've found the vcvarsall.bat file and tried running it by dragging and dropping it into the cmd window but it was not recognised.
To setup your environment using vcvarsall.bat you need to run it like
%COMSPEC% /k "C:\path\to\vcvarsall.bat"
Few simple steps to build static Qt would be:
cd C:\path\to\Qt
configure.exe -static -release
nmake
Explaining how to build static Qt applications is beyond this SO question. Please proceed to http://qt-project.org/wiki/Build_Standalone_Qt_Application_for_Windows.
I have downloaded qt-windows-opensource-5.0.1-mingw47_32-x86-offline.exe and installed on my system, after that i launched QT Creator and tried to run a QML based example (shipped example is "QtQuick Examples - MouseArea" which tried, and below problem comes with any example i try to run) which was supplied with along with the whole package.
When i try to run the project i get below log...
13:00:20: Running steps for project mousearea...
13:00:20: Configuration unchanged, skipping qmake step.
13:00:20: Starting: "mingw32-make.exe"
qtcreator_ctrlc_stub: Command line failed: mingw32-make.exe
13:00:20: The process "mingw32-make.exe" crashed.
Error while building/deploying project mousearea (kit: Desktop Qt 5.0.1 MinGW 32bit)
When executing step 'Make'
Do you have mingw47_32 installed? The Qt you download needs the very same compiler the Qt libraries where compiled with, and that is the one that appears in the name of the download.
So my guess is that you're compiling with some other mingw which is not version 4.7 / 32 bits. Download that version, point Qt to it in Tools >> Options >> Kits. Rebuild then.
The problem was resolved later on, I installed qt-windows-opensource-5.0.1-mingw47_32-x86-offline.exe on 64bit system and that's why mingw32-make.exe crashed, downloading appropriate QT for 64bit system solve the problem.