在Linux机器上从源代码构建Qt-4.3.2 [英] Building Qt-4.3.2 from source on Linux machine

查看:120
本文介绍了在Linux机器上从源代码构建Qt-4.3.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Linux机器上构建和编译Qt 4.3.2.我已经从

I am trying to build and compile Qt 4.3.2 on my linux machine.I have downloaded package from http://download.qt.io/archive/qt/4.3/qt-x11-opensource-src-4.3.2.tar.gz.mirrorlist Then I configured it with options:

./configure -platform linux-g++ -debug-and-release -qt-zlib -qt-libtiff -qt-libmng -qt-libjpeg -openssl -v -opengl -glib

之后,我尝试使用make进行编译,并得到以下错误.

After that I am trying to compile it with make and getting following error.

../../../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

我做错了什么还是留下了什么吗?

Did I do anything wrong or leaving something?

推荐答案

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

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).

这篇关于在Linux机器上从源代码构建Qt-4.3.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆