我也在制作Qt的静态库(qt.4.3.3),做同样的步骤是
我下载了qt-all-opensource-src-4.3.3的开源软件。我使用以下步骤构建静态库。我正在使用的gcc版本是gcc 5.2.0
cd qt-all-opensource-src-4.3.3
gmake conflcean
./configure -release -static -largefile -qt3support -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -glib -platform linux-g++-64 -confirm-license -no-openssl -no-qdbus -prefix ./static_new -prefix-install -opengl -sm -lSM -lICE -xshape -lX11 -xinerama -lXinerama -xcursor -lXcursor -xfixes -lXfixes -xrandr -lXrandr -xrender -lXrender -fontconfig -lfontconfig -tablet -lXi -xkb -glib -lglib-2.0 -lXext -lz -lgthread-2.0
gmake
gmake install
我收到以下错误消息
from ../../corelib/codecs/qsimplecodec_p.h:36,
from ../../corelib/codecs/qsimplecodec.cpp:22:
../../../include/QtCore/../../src/corelib/thread/qatomic.h: In instantiation of ?QAtomicPointer<T>::QAtomicPointer(T*) [with T = QByteArray]?:
../../corelib/codecs/qsimplecodec.cpp:592:74: required from here
../../../include/QtCore/../../src/corelib/thread/qatomic.h:190: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:190:7: note: declarations in dependent base ?QBasicAtomicPointer<QByteArray>? are not found by unqualified lookup
../../../include/QtCore/../../src/corelib/thread/qatomic.h:190:7: note: use ?this->init? instead
gmake[1]: *** [.obj/release-static/qsimplecodec.o] Error 1
gmake[1]: Leaving directory `/in/inndt69/Projects/oasys/QT/QT/qt-x11-commercial-src-4.3.3/qt-x11-commercial-src-4.3.3/src/tools/rcc'
gmake: *** [sub-rcc-make_default-ordered] Error 2
此构建错误的确切原因是什么?
我经历了Building Qt-4.3.2 from source on Linux machine,但我不确定这两个是否只是解决此问题的正确方法
上述答案的评论:
它会给你一个提示错误的提示:使用'this-&gt; init。使用模板的旧代码会发生这种情况,这些模板没有使用this-&gt;完全限定对类成员的访问权限。字首。在配置之前尝试(a)将
CXXFLAGS='-fpermissive'
添加到您的环境中,或者(b)获得更新的Qt版本或(c)更旧的编译器(开玩笑)。
我的问题是:
此构建错误的确切原因是什么?
我不确定用CXXFLAGS='-fpermissive
编译Qt代码是否会在以后产生任何副作用。