Problems Building Qt from source
-
I am trying to build Qt 5.12.9 from source using MinGW (7.3.0) on Windows 10 and I keep getting the same error over and over again. I was wondering if someone could tell me why I might be getting this error:
configure.bat -release -no-pch -optimize-size -opengl desktop -platform win32-g++ -prefix "C:\Qt\Static\5.12.9" -skip qtactiveqt -skip qtdeclarative -skip qtwebglplugin -skip qtspeech -skip webengine -skip location -nomake tools -nomake tests -nomake examples /qtbase/src/corelib/global/qlogging.cpp:1902:43: error: 'STATUS_FATAL_APP_EXIT' was not declared in this scope TerminateProcess(GetCurrentProcess(), STATUS_FATAL_APP_EXIT); ^ Makefile:517: recipe for target 'qlogging.o' failed mingw32-make: *** [qlogging.o] Error 1
-
STATUS_FATAL_APP_EXIT is a windows define. Looks like your WinAPI headers are out of date. Make sure MinGW is fetching the correct ones. The define is in ntstatus.h
-
Okay so that got me going in the correct direction, My headers were actually okay, but I was not running the commands the right way. I was using a standard old cmd.exe, which appeared to have gcc.exe configured in the path, alone with g++.exe and mingw32-make.exe, except for some reason the "\bin" directory was not in the PATH variable somehow. I assumed that it was because it found gcc.exe, and I was wrong (still not sure how I was wrong with that logic).
TL;DR there is a "mingw-w64.bat" in the PROGFIL~1 directory that you need to execute (which sets the PATH) and then run the configure.bat command inside that window that pops up.