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

标签 c++ linux qt opengl

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

我是不是做错了什么或者遗漏了什么?

最佳答案

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

关于c++ - 在 Linux 机器上从源代码构建 Qt-4.3.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31069135/

相关文章:

c++ - 逻辑门的快速计算

c++ - 如何在您的应用程序中安全地处理密码

c - 在 Linux 上的 C 命令行中遇到多个搜索字符串的问题

windows - 用于在同一项目上使用 Windows 和 Linux 的 eclipse 字符集

c++ - 在类中存储内存内容 - C++

c++ - 规范化约束时,需要表达式是原子吗?

java - 如何恢复 Oracle JDK 更新?

c++ - 使用 Qt 检测和打印 Unicode 字符

c++ - 使用 std::sort 根据数据类型中包含的整数值对混合数据类型 vector 进行排序有多安全?

c++ - Qt 解析一个 json 响应