Std :: tr1 not declared

I am trying to compile qt from the source code for the nth time, this time with the configure -release -platform-win32 option, but I get errors:
enter image description here

Does anyone know how to fix this?
Thank.

+3
source share
4 answers

You may encounter this problem when compiling Qt using the MinGW compiler (possibly any gcc compiler), which by default compiles C ++ programs with the C ++ 11 standard enabled.

The third-party JavaScriptCore library is trying to identify some shells that "normalize" has_trivial_constructorand their associated templates, but it seems that it has not yet been updated to deal with GCC updates to include the complete C ++ 11 standard.

, MinGW, ++ 11, , mkspecs\win32-g++\qmake.conf, -std=gnu++98 ++:

QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -std=gnu++98
#                               ^^^^^^^^^^^^
+3

gcc 4.7, ++ 11, -std=c++11 -std=gnu++11, std . tr1 sub namespace , .

+2

( #include <type_traits>) #include <tr1/memory> TypeTraits.h

0

std::tr1::has_trivial_constructor ++ 11 std::is_trivially_constructible. . http://www.cplusplus.com/reference/type_traits/is_trivially_constructible.

0
source

All Articles