I have been building Qt 5 for a long time successfully on Windows using GCC/MinGW-w64. When I try the same with GCC 11.1, the build fails with a strange error message. What can I do to make it work?
I have built the compiler myself using the develop
branch of https://github.com/niXman/mingw-builds with this command:
../build --mode=gcc-11.1.0 --arch=x86_64 --buildroot=/c/mingw-builds/BuildRoot --update-sources --exceptions=seh --threads=posix --enable-languages=c++ --jobs=48 --rt-version=v7
Then I retrieve Qt like this on an MSYS2 console:
# Ensure that the right Perl is being used to prevent the possible later compilation error "fatal error: QVector: No such file or directory"
export PATH=/c/Strawberry/perl/bin/:$PATH
cd /c
cd Libraries/
mkdir Qt
cd Qt
git clone git://code.qt.io/qt/qt5.git
cd qt5
git checkout v5.13.2
perl init-repository --module-subset=essential --berlin
cd ..
Then I try to build Qt:
mkdir Build
cd Build
../qt5/configure -prefix ../Install -release -recheck-all -confirm-license -opensource -platform win32-g++ -opengl desktop -nomake examples -nomake tests -skip qtconnectivity -skip qtdeclarative -skip qtlocation -skip qtmultimedia -skip qtquickcontrols -skip qtquickcontrols2 -skip qtsensors -skip qtwebsockets -skip qtwinextras -skip qtwebchannel -skip qtwebengine
mingw32-make -j 48
But configure
displays a lot of errors similar to this:
qt5/qtbase/src/corelib/global/qendian.h:333:35: error: 'numeric_limits' is not a member of 'std'
How can I fix it?
Additionally I would like to link it against the "FreeType" library (version built for MinGW) that is distributed by "Open CASCADE" (see https://dev.opencascade.org/resources/download/3rd-party-components). How is this possible?