redhat5.4裏安裝Qt4.4.3經驗

轉載自:http://blog.sina.com.cn/s/blog_4b0d607401014uwk.html

 在安裝Qt的過程中可能遇到種種困難,以下是本人在安裝過程中遇到的問題及解決辦法:

#-DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE-DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++-I. -I../../include/QtCore -I../../include/QtCore -I../../include-I../../include/QtGui -I.rcc/release-shared -I../3rdparty/libpng-I../3rdparty/zlib -I../3rdparty/freetype/src-I../3rdparty/freetype/include -I../3rdparty/freetype/builds/unix-I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared-I/usr/X11R6/include -I.uic/release-shared -o.obj/release-shared/qapplication.o kernel/qapplication.cpp
In file included from../../include/QtGui/private/qt_x11_p.h:1,
from kernel/qapplication.cpp:70:
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:65:22:error: X11/Xlib.h: 沒有該文件或目錄
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:70:23:error: X11/Xutil.h: 沒有該文件或目錄
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:71:21:error: X11/Xos.h: 沒有該文件或目錄
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:78:23:error: X11/Xatom.h: 沒有該文件或目錄
In file included from../../include/QtGui/private/qt_x11_p.h:1,
from kernel/qapplication.cpp:70:
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:280:error: ‘Colormap’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:281:error: ISO C++ forbids declaration of ‘Visual’ with notype
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:281:error: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:290:error: ‘Time’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:291:error: ‘Window’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:292:error: ‘Window’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:315:error: ‘Window’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:318:error: ‘Window’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:319:error: ‘Window’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:319:error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:320:error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:321:error: ‘Window’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:321:error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:332:error: ISO C++ forbids declaration of ‘XSelectionRequestEvent’with no type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:332:error: expected ‘,’ or ‘...’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:334:error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:335:error: ‘Atom’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:337:error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:338:error: ‘Atom’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:339:error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:340:error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:340:error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:341:error: ‘Atom’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:341:error: template argument 1 is invalid
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:342:error: ‘Atom’ has not been declared
In file included from../../include/QtGui/private/qt_x11_p.h:1,
from kernel/qapplication.cpp:70:
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:343:error: ‘Atom’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:404:error: ISO C++ forbids declaration of ‘Atom’ with no type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:404:error: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:406:error: ISO C++ forbids declaration of ‘Window’ with notype
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:406:error: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:408:error: ‘Window’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:414:error: ‘Time’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:415:error: ‘Time’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:441:error: ISO C++ forbids declaration of ‘Visual’ with notype
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:441:error: expected ‘;’ before ‘*’ token
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:442:error: ‘Colormap’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:620:error: ‘Atom’ does not name a type
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:622:error: ‘Atom’ has not been declared
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:645:error: ‘FocusOut’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:646:error: ‘FocusIn’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:647:error: ‘KeyPress’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:648:error: ‘KeyRelease’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:649:error: ‘None’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:650:error: ‘RevertToParent’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:651:error: ‘GrayScale’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:652:error: ‘CursorShape’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:667:error: ‘XPoint’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:667:error: template argument 1 is invalid
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:668:error: ‘XRectangle’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:668:error: template argument 1 is invalid
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:669:error: ‘XChar2b’ was not declared in this scope
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:669:error: template argument 1 is invalid
make[1]: *** [.obj/release-shared/qapplication.o] 錯誤 1
make[1]:正在離開目錄`/home/administrator/software/qt-x11-opensource-src-4.4.3/src/gui'
make: *** [sub-gui-make_default-ordered] 錯誤 2

以上錯誤原因是缺x11庫。

解決辦法:安裝 libx11-dev 具體安裝方法請看我的上一篇文章



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章