我正在尝试在我的linux机器上构建和编译Qt 4.3.2。我从http://download.qt.io/archive/qt/4.3/qt-x11-opensource-src-4.3.2.tar.gz.mirrorlist下载了包 然后我用选项配置它:
./configure -platform linux-g++ -debug-and-release -qt-zlib -qt-libtiff -qt-libmng -qt-libjpeg -openssl -v -opengl -glib
之后我试图用make
编译它并得到以下错误。
../../../include/QtCore/../../src/corelib/thread/qatomic.h: In instantiation of ‘QAtomicPointer<T>::QAtomicPointer(T*) [with T = QByteArray]’:
../../corelib/codecs/qsimplecodec.cpp:609:74: required from here
../../../include/QtCore/../../src/corelib/thread/qatomic.h:207:7: error: ‘init’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
../../../include/QtCore/../../src/corelib/thread/qatomic.h:207:7: note: declarations in dependent base ‘QBasicAtomicPointer<QByteArray>’ are not found by unqualified lookup
../../../include/QtCore/../../src/corelib/thread/qatomic.h:207:7: note: use ‘this->init’ instead
make[1]: *** [.obj/release-shared/qsimplecodec.o] Error 1
make[1]: Leaving directory '/home/shraddha/shraddha/jst/QT/qt-x11-opensource-src-4.3.2/src/tools/rcc'
make: *** [sub-rcc-make_default-ordered] Error 2
我做错了什么或留下了什么?
答案 0 :(得分:2)
It gives you a hint what is wrong note: use ‘this->init
. This happens with older code using templates not fully qualifying the access to class members with the this->
prefix. Either try to (a) add CXXFLAGS='-fpermissive'
to your environment before configuring, or (b) get a newer Qt Version or (c) an older compiler (kidding).