Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Ubuntu Linux上构建Qt4.7.0库_Qt_Ubuntu_Build_Qt4 - Fatal编程技术网

在Ubuntu Linux上构建Qt4.7.0库

在Ubuntu Linux上构建Qt4.7.0库,qt,ubuntu,build,qt4,Qt,Ubuntu,Build,Qt4,我正试图通过以下步骤在Ubuntu Linux(Amazon EC2实例)上构建QT 4.7.0库: sudo apt-get update sudo apt-get install build-essential sudo apt-get build-dep qt4-qmake sudo ./configure -openssl -release -no-webkit -nomake examples -nomake demos -nomake docs -v -prefix /usr/loc

我正试图通过以下步骤在Ubuntu Linux(Amazon EC2实例)上构建QT 4.7.0库:

sudo apt-get update
sudo apt-get install build-essential
sudo apt-get build-dep qt4-qmake
sudo ./configure -openssl -release -no-webkit -nomake examples -nomake demos -nomake docs -v -prefix /usr/local/qt4 -opensource
sudo make sub-src
构建失败,我得到了关于qpdf的错误

-I.uic/release-shared -o .obj/release-shared/qpdf.o painting/qpdf.cpp
In file included from ../../include/QtGui/private/qcups_p.h:1:0,
             from painting/qpdf.cpp:47:
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:78:11: error: âppd_file_tâ does not name a type
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:80:11: error: âppd_file_tâ does not name a type
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:81:11: error: âppd_option_tâ does not name a type
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:84:11: error: âppd_option_tâ does not name a type
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:87:34: error: ISO C++ forbids declaration of âtype nameâ with no type [-fpermissive]
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:87:47: error: template argument 1 is invalid
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:103:56: error: âppd_group_tâ does not name a type
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:103:77: error: ISO C++ forbids declaration of âgroupâ with no type [-fpermissive]
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:104:62: error: âppd_group_tâ does not name a type
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:104:75: error: ISO C++ forbids declaration of âgroupâ with no type [-fpermissive]
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:108:11: error: âppd_option_tâ does not name a type
../../include/QtGui/private/../../../src/gui/painting/qcups_p.h:110:5: error: âppd_file_tâ does not name a type
painting/qpdf.cpp: In member function âvirtual void QPdfBaseEngine::setProperty(QPrintEngine::PrintEnginePropertyKey, const QVariant&)â:
painting/qpdf.cpp:1470:5: warning: case value â65024â not in enumerated type âQPrintEngine::PrintEnginePropertyKeyâ [-Wswitch]
painting/qpdf.cpp:1464:5: warning: case value â65025â not in enumerated type âQPrintEngine::PrintEnginePropertyKeyâ [-Wswitch]
painting/qpdf.cpp:1467:5: warning: case value â65026â not in enumerated type âQPrintEngine::PrintEnginePropertyKeyâ [-Wswitch]
painting/qpdf.cpp:1473:5: warning: case value â65027â not in enumerated type âQPrintEngine::PrintEnginePropertyKeyâ [-Wswitch]
painting/qpdf.cpp: In member function âvirtual QVariant QPdfBaseEngine::property(QPrintEngine::PrintEnginePropertyKey) constâ:
painting/qpdf.cpp:1584:5: warning: case value â65024â not in enumerated type âQPrintEngine::PrintEnginePropertyKeyâ [-Wswitch]
painting/qpdf.cpp:1578:5: warning: case value â65025â not in enumerated type âQPrintEngine::PrintEnginePropertyKeyâ [-Wswitch]
painting/qpdf.cpp:1581:5: warning: case value â65026â not in enumerated type âQPrintEngine::PrintEnginePropertyKeyâ [-Wswitch]
painting/qpdf.cpp:1587:5: warning: case value â65027â not in enumerated type âQPrintEngine::PrintEnginePropertyKeyâ [-Wswitch]
make[1]: *** [.obj/release-shared/qpdf.o] Error 1
make[1]: Leaving directory `/home/ubuntu/downloads/qt-everywhere-opensource-src-4.7.0/src/gui'
make: *** [sub-gui-make_default-ordered] Error 2

然而,通过遵循相同的步骤,我成功地构建了Qt4.8.2

请不要将控制台输出粘贴为图像,复制粘贴文本本身。当我删除gui、cups和phonon支持时,QT成功构建
sudo./configure-openssl-release-no webkit-nomake示例-nomake演示-nomake docs-v-prefix/usr/local/qt4-opensource-no phonon-no phonon-backend-no gui-no cups