我正在尝试构建 qt-all-opensource-src-4.5.3 源,我正在进行 debian 测试,构建失败并显示以下错误消息:
g++ -c -pipe -g -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -我。-I../../../include/QtCore -I../../../include/QtXml -I../../../include -I.moc/release-shared -o .obj/release-shared/preprocessorcontrol.o preprocessorcontrol.cpp g++ -c -pipe -g -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -我。-I../../../include/QtCore -I../../../include/QtXml -I../../../include -I.moc/release-shared -o .obj/release-shared/replacetoken.o replacetoken.cpp g++ -c -pipe -g -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -我。-I../../../include/QtCore -I../../../include/QtXml -I../../../include -I.moc/release-shared -o .obj/release-shared/tokenreplacements.o tokenreplacements.cpp g++ -c -pipe -g -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -我。-I../../../include/QtCore -I../../../include/QtXml -I../../../include -I.moc/release-shared -o .obj/release-shared/textreplacement.o textreplacement.cpp g++ -c -pipe -g -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -我。-I../../../include/QtCore -I../../../include/QtXml -I../../../include -I.moc/release-shared -o .obj/release-shared/portingrules.o portingrules.cpp g++ -c -pipe -g -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -我。-I../../../include/QtCore -I../../../include/QtXml -I../../../include -I.moc/release-shared -o .obj/release-shared/qtsimplexml.o qtsimplexml.cpp g++ -c -pipe -g -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -我。-I../../../include/QtCore -I../../../include/QtXml -I../../../include -I.moc/release-shared -o .obj/release-shared/projectporter.o projectporter.cpp g++ -c -pipe -g -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -我。-I../../../include/QtCore -I../../../include/QtXml -I../../../include -I.moc/release-shared -o .obj/release-shared/proparser.o proparser.cpp 在 translationunit.h:48:0 包含的文件中, 来自 projectporter.cpp:47: codemodel.h:在 'void CodeModel::Collection::add(CollectedType*) [with CollectedType = CodeModel::Type]' 的实例化中: codemodel.h:296:36:从这里需要 codemodel.h:99:7:错误:未在此范围内声明“插入”,并且在实例化点通过依赖于参数的查找未找到任何声明 [-fpermissive] codemodel.h:99:7:注意:非限定查找未找到依赖基“QMultiHash”中的声明 codemodel.h:99:7:注意:改用“this->insert” g++ -c -pipe -g -fno-exceptions -O2 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -我。-I../../../include/QtCore -I../../../include/QtXml -I../../../include -I.moc/release-shared -o .obj/release-shared/fileporter.o fileporter.cpp make[5]: *** [.obj/release-shared/projectporter.o] 错误 1 make[5]: *** 等待未完成的工作...... make[5]: 离开目录`/home/habeeb/lab/xml/debian/3rd/qt/4.5.3/qt-all-opensource-src-4.5.3/tools/porting/src' make[4]: *** [sub-src-make_default] 错误 2 make[4]: 离开目录`/home/habeeb/lab/xml/debian/3rd/qt/4.5.3/qt-all-opensource-src-4.5.3/tools/porting' make[3]: *** [sub-porting-make_default-ordered] 错误 2 make[3]: 离开目录`/home/habeeb/lab/xml/debian/3rd/qt/4.5.3/qt-all-opensource-src-4.5.3/tools' make[2]: *** [sub-tools-make_default-ordered] 错误 2 make[2]: 离开目录`/home/habeeb/lab/xml/debian/3rd/qt/4.5.3/qt-all-opensource-src-4.5.3'
有问题的代码,model.h(第 95 到 100 行):
类集合:公共 QMultiHash { 上市: 无效添加(CollectedType *collectedItem) { insert(collectedItem->name(),collectedItem); } };
与缺少图书馆有关吗?我怎样才能解决这个问题 ?
谢谢你 !