QT error with executing "make" - c++

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:

Related

Qt cannot load cocoa plugin

I'm trying to compile and run an application on a MacBook using Qt Creator. There are no issues compiling the project, but when I try and run it, it seems to be unable to load a plugin.
Could not load the Qt platform plugin "cocoa" in "" even though it was found.
The application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
This error occurs both when trying to run the application from Qt Creator or via Finder. It seems to only happen when I use the CMake build system (no issues when using QMake), but my existing project that I need to deploy on MacOS uses CMake.
My steps to reproduce are:
Install a completely clean MacOS (no user data)
Install Xcode 11
Install CMake 3.15
Install Qt 5.13.1 MacOS package
Open QtCreator->New Project->Qt Quick Application - Scroll
Set build system to CMake (important)
Compile and notice error
I am using:
Qt 5.13.1
macOS Catalina 10.15
Apple Clang 11
I recognize that for final user deployment I will need to use the macqtdeploy tool to copy the Qt libraries to the executable folder, but I should be able to run my app from QtCreator without doing this? Especially as it works fine when using QMake.
So it ended up being some kind of name resolution thing where Qt Creator couldn't decide whether to use the debug or release versions of the framework. Supplying DYLD_IMAGE_SUFFIX=_debug fixed this (add this to the environment section under Kits).

How to debug qt project in xcode?

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.

Configuring Qt Command Prompt

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.

The process "mingw32-make.exe" crashed Error

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.

Can't build, qmake.exe crashes in Qt Creator

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.