在Linux机器上从源代码构建Qt-4.3.2

Building Qt-4.3.2 from source on Linux machine

本文关键字:构建 Qt-4 源代码 Linux 机器      更新时间:2023-10-16

我正试图在我的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

我做错了什么或留下了什么?

它会提示note: use ‘this->init出了什么问题。这种情况发生在使用模板的旧代码中,这些模板没有完全限定对具有this->前缀的类成员的访问权限。请尝试(a)在配置之前将CXXFLAGS='-fpermissive'添加到您的环境中,或者(b)获得较新的Qt版本或(c)较旧的编译器(开玩笑)。