The process "mingw32-make.exe" crashed Error - c++

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.

Related

Cannot Run Compiler 'cl' for qt5.10.1 on Windows 10 in terminal

I have never used qt before, but I got a task to build an already existing application for Windows and Mac using the newest version of qt. What I have done so far is:
Installed Visual Studio Professional 2017.
Installed the latest Qt 5 Open Source.
Note: when installing the QT 5 I installed all of the components under QT/ QT 5.10.1 which were: qt 5.10.1 components and under QT/Tools I installed QT Creator 4.6.0 CDB Debugger Support and MinGW 5.3.0 : qt 5 Tools
I cloned the branch from GitHub that I wanted to build to C:/Projects
Then in Git Bash I cd to the project and tried to run qmake. The first time I had this problem:
"bash: qmake: command not found"
After searching into the problem I found out that I haven't added "Qt/5.10.1/msvc2017_64/bin" to PATH and I added it. Now when I echo $PATH I can see the directory added.
Now after bash recognises qmake and I try to run it it says:
Project ERROR: Cannot run target compiler 'cl'. Output:
===================
Maybe you forgot to setup the environment?
I have no idea how to fix the problem due to the fact that I have never used QT to build anything before. Can you help me?
In the read me file for the application I am trying to build it says:
Step-by-step instructions
1. Clone this branch
2. cd into the project
3. Run qmake - this wil generate Makefiles for all of the project's modules
4.Run make (Use the -j4 of -j flags - this greatly speeds up the build process - see the manual page for make for more info). You can also use the -s flag to silence the output - this also wins you a few seconds.
I am a bit puzzled by the instructions, it does not say to run qmake -project anywhere, but there is a qt project file in the directory that I cd to. Does this mean that I don't have to run qmake -project?
Also I have no idea how to run make by using the -j4 and -j flags and how to run flags in general. Could someone help me?
I believe that for the Cannot Run Compiler 'cl' issue I have some kind of a problem with the set up. Did I install too many components or is it to do with the VS setup?
I highly recommend you to install Qt from the Qt installer, and to use Qt Creator.
However, if you want to use it from source, you first need to get a compiler (ex: MinGW). Then you need to execute the instructions, but you need to use a MinGW (or whatever compiler you use) command prompt, which will automatically set the environment variables needed.
Note that this is Windows specific. On mac and linux, the compiler's environment variables are already set in the default command prompt (if there is a compiler, obviously).

Building QT for msvc2015 - and get working projects?

There already is a quite related question (rq) here, but it is not specialized enough and my reputation is not high enough to ask for more advice in the comments ... yet, time is running and I've got to get somewhere.
Once the original question is answered, this one can and should be deleted.
What I want: Working in Visual Studio 2015, using the qt-library. That's it.
What I did:
Install vs2015, works
Download the qt5.5.0 source, built it following the (rq) instruction using jom (nmake worked the same, just was slower)
Install the qt package extension for vs2015, also following (rq)
The first error: The building-process didn't create any mkspecs, so i wasn't able to set the directory in the QT-options in visual studio: "This QT version uses an unsupported makefile generator (used:, supported: MSVN.NET, MSBUILD)"
I tried to hack that by replacing it with the mkspec-folder of an installed version to I was able to select the qtbase-folder in the Qt Options.
Played around with the library-directories, the include-directories and the additional-dependencies of the VS-Project. No matter what I did, the include-files where not found.
As this didn't work out, I installed qt 5.5.0 mingw492_32 with the installer. Using that I was able to create a new project with the QTCreator. It compiled in the QTCreator. After that I executed
qmake -platform win32-msvc2015 -tp vs
to convert the project into a Visual-Studio-project, while qmake was the executable from the previously BUILT version, not the installed one, the include-files where still not found in visual studio.
What am I doing wrong? The library-directories, the include-directories and the additional-dependencies look fine to me in the converted project.
EDIT 1:
I followed the walkthrough and everything built successfully. Yet, the mkspecs-folder is still empty. Creating a Qt-Widget-application with the Qt Creator endts up in a crashing app (no changes were made to the default code):
Second Chance Assertion Failed: File minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp, Line 980
Calling
qmake -platform win32-msvc2015 -tp vs
also isn't successfull:
qmake -platform win32-msvc2015 -tp vs
WARNING: Unable to generate output for: D:/_Daten/_Studium/Bachelor-Thesis/Visual-Studio/VISAR-FSA/GuiTest/Makefile.Debug [TEMPLATE vsapp]
WARNING: Unable to generate output for: D:/_Daten/_Studium/Bachelor-Thesis/Visual-Studio/VISAR-FSA/GuiTest/Makefile.Release [TEMPLATE vsapp]
EDIT 2:
Concerning the mkspecs: Turns out I had to call both:
jom -j 8
jom install
Now all mkspecs are created. The official documentation made me think that the second one only was an option for the build when a destination path was set.
Yet, a freshly created Qt Widget Application in Qt Creator, with the built and installed QT-version and the correct compiler, still won't compile. A LNK2019 occures in [qtmain.lib(qtmain_win.obj)], telling me that there is a link to a symbol "__imp__CommandLineToArgvW#8" in function "_WinMain#16", that was not resolved.
Here is a complete walkthrough:
How to compile Qt 5 under Windows or Linux, 32 or 64 bit, static or dynamic on VS2010, VS2012, VS2013 or VS2015 Express or g++.
You might want to uninstall all previous Qt.
I have Qt built for VS2015 as well as VS2013 and for 5.50 onwards it shouldn't need anything particularly special to get it to build successfully. I tend to use a cut down version of the Walkthrough that #jafar's mentions (and also closer to the method in the official docs')
Clone the qt5 repository or unzip the source
Start a command prompt. IMPORTANT: create the correct 'VS2015 x86 or x64' prompt
DON'T edit the msvc-desktop.conf as mentioned in the Walkthrough. (Qt can't be built with the /MT flag)
Run configure:
configure -debug-and-release -opensource -platform win32-msvc2015 -opengl desktop -nomake examples -nomake tests
Build with jom -j 8 (I find you get diminishing returns beyond that) or nmake. If you omit the examples and tests I can build the whole of qtbase in about 10-15 minutes
Run jom install or nmake install

Deploying Qt application on Windows/Linux, developing on MacOS

I am trying to send my current program to a colleague. He's on Linux, I'm on MacOS. The result of my release build is an .app file. I would like to have a binary executable through ./binary. There's a Makefile in the folder, but it throws make: Nothing to be done for 'first'., so I guess I can't use that.
I am running Qt 5.4.1, Qt Creator 3.4.0. Compiling through GCC/CLANG.
Is there a way to do this?

building Qt 5.2.0 with mingw 4.8.1

this is the first time i am trying to build Qt from source. so i need help from a expert. previously i used qt by installing it using their offline installers. but open cv library cannot be used with it. so i need to build qu frim source. im using win 7 64 bit OS.
i installed active perl, active python, ruby and git. the niwest versions and and added them to path. my path variable llist looks like follows.
then my mingw gcc version looks like follows.
then i build and installed ICU librarys as discribed in http://qt-project.org/wiki/Compiling-ICU-with-MinGW
then opened a cmd as adminisrtator and cd into qt extracted folder and configured as
configure -prefix %CD%\qtbase -opensource -nomake tests -opengl desktop
after configure complets then mingw32-make
it tooks about 1 hour in my i5 2.6ghz processor and ended with following errors.
what may be dhe mistake. am i doing enything wrong. has enybody successfully compiled Qt 5.2 with mingw 4.8.1 on a win 7 64bit system. if qt build successfully will it end with a messsage that qt was build successfully or somthing similar.
i know qt creator can be installed seperatly. but qt designer, will it also be built with qt librarys. can some expert help me with this issue. im trying this for several days.
eny helpwill be highly appricated... thank you....
Try to run make again. It was the same for me.
After two tries it compiled successfully.
I don't remember if it was the same error, but it always fail first time for me and then after running make again it compiles.
Previous versions didn't have this problem.
I have now problem compiling my code, because gcc crashes, but that's different 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.