从源代码安装Qt,版本4.8.6

时间:2018-08-28 15:26:43

标签: qt

我正在尝试从源代码编译Qt,但在灌输过程中出现错误:

In file included from ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastAllocBase.h:84,
                 from ../3rdparty/javascriptcore/JavaScriptCore/wtf/HashCountedSet.h:25,
                 from ../3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h:27,
                 from ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSCell.h:26,
                 from ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSAPIValueWrapper.h:28,
                 from ../3rdparty/javascriptcore/JavaScriptCore/API/APICast.h:29,
                 from ../3rdparty/javascriptcore/JavaScriptCore/API/JSBase.cpp:30:
../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:173:69: error: ‘std::tr1’ has not been declared
     template<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { };

这是编译器问题吗?

1 个答案:

答案 0 :(得分:1)

您的答案是here

  

使用默认启用的MinGW / gcc时,会出现此问题   C ++ 11功能,例如较新的nuwen MinGW构建。

     

直到JavaScriptCore被更新以处理gcc的标准C ++ 11   支持,必须在未启用C ++ 11的情况下进行构建。

     

将mkspecs \ win32-g ++ \ qmake.conf更改为具有以下行:

     

QMAKE_CXXFLAGS = $$ QMAKE_CFLAGS -std = gnu ++ 98

     

允许JavaScriptCore构建。