title: How can I build Qt 5.13.2 with GCC 11.1 on Windows?
body: <p>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?</p>
  <p>I have built the compiler myself using the <code>develop</code> branch of <a href="https://github.com/niXman/mingw-builds" rel="nofollow noreferrer">https://github.com/niXman/mingw-builds</a> with this command:</p>
  <pre><code>../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
  </code></pre>
  <p>Then I retrieve Qt like this on an MSYS2 console:</p>
  <pre><code># Ensure that the right Perl is being used to prevent the possible later compilation error &quot;fatal error: QVector: No such file or directory&quot;
  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 ..
  </code></pre>
  <p>Then I try to build Qt:</p>
  <pre><code>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
  </code></pre>
  <p>But <code>configure</code> displays a lot of errors similar to this:</p>
  <pre><code>qt5/qtbase/src/corelib/global/qendian.h:333:35: error: 'numeric_limits' is not a member of 'std'
  </code></pre>
  <p>How can I fix it?</p>
  <p>Additionally I would like to link it against the &quot;FreeType&quot; library (version built for MinGW) that is distributed by &quot;Open CASCADE&quot; (see <a href="https://dev.opencascade.org/resources/download/3rd-party-components" rel="nofollow noreferrer">https://dev.opencascade.org/resources/download/3rd-party-components</a>). How is this possible?</p>