- 
    
Bug
 - 
    Resolution: Fixed
 - 
    
P2: Important
 - 
    None
 - 
    6.0.4
 - 
    None
 - 
    Windows using MinGW-w64 GCC 11 (both for 32-bit and 64-bit Windows) from http://winlibs.com/
 
When building both Qt5 and Qt6 with GCC 11 (in my case on Windows using MinGW-w64 GCC 11 from http://winlibs.com/) there are multiple errors reporting that std::numeric_limits does not exist.
As explained on https://gcc.gnu.org/gcc-11/porting_to.html there are some headers (including <limits>) that need to be explicitly included since GCC 11.
For me the wollowing solution works to build both Qt5 ant Qt6 with GCC 11: I add these 3 lines at the top of qtbase/src/corelib/global/qglobal.h :
#ifdef __cplusplus
#include <limits>
#endif
Probably my solution is a bit general, but it does the trick for now.
A cleaner solution might be to add #include <limits> only where it's needed.
- relates to
 - 
                    
QTBUG-90395 FTBFS: qendian.h missing <limits> include
-         
 - Closed
 
 -         
 - 
                    
        
        QTBUG-89977
        Qt build on GCC 11
    
-         
 - Closed
 
 -