Reputation: 17120
I'm trying nth time to compile qt from source, this time with option configure -release -platform-win32
but I'm getting errors:
Anyone knows how to fix it?
Thanks.
Upvotes: 7
Views: 14073
Reputation: 146
I was able to resolve this very issue just by putting
QMAKE_CXXFLAGS += -std=gnu++98
in src/script/script.pro. I hope it doesn't cause any problems to have compiled some of the compilation units c++-11 and other gnu++98.
Upvotes: 0
Reputation: 1630
You can replace the preliminary std::tr1::has_trivial_constructor
by the C++11 standardized std::is_trivially_constructible
. See http://www.cplusplus.com/reference/type_traits/is_trivially_constructible .
Upvotes: 2
Reputation: 3109
Try (wrapped in the macro around #include <type_traits>
) adding
#include <tr1/memory>
in TypeTraits.h
Upvotes: 0
Reputation: 340208
You can run into this problem when compiling Qt with a MinGW compiler (maybe any gcc compiler) that defaults to compiling C++ programs with the C++11 standard enabled.
The 3rd party library JavaScriptCore tries to define some wrappers that 'normalize' has_trivial_constructor
and related templates, but apparently it hasn't been been updated yet to deal with GCC's updates to incorporate the completed C++11 standard.
The fix is to use a MinGW compiler that doesn't enable C++11 features by default, or to turn them off by editing mkspecs\win32-g++\qmake.conf
to add the -std=gnu++98
option to C++ builds:
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -std=gnu++98
# ^^^^^^^^^^^^
Upvotes: 8