qt4.6.4編譯筆記

來源:互聯網
上載者:User

1.下載源碼qts4.6.4,分別解壓三份,qt-x11,x86-qte,arm-qte

2.cd arm-qte/mkspec/qws/linux-arm-g++/

     vi qmake.conf

     QMAKE_CC                = arm-linux-gcc -lts
     QMAKE_CXX               = arm-linux-g++ -lts
    QMAKE_LINK              = arm-linux-g++ -lts
    QMAKE_LINK_SHLIB        = arm-linux-g++ -lts
    加上lts後,在編譯時間應用程式時就不會出現ld: warning: libts-0.0.so.0, needed by /home/zhxt/qt_for_arm/qt-everywhere-opensource-src-4.6.2/lib/libQtGui.so,

    not found (try using -rpath or -rpath-link)/home/zhxt/qt_for_arm/qt-everywhere-opensource-src-4.6.2/lib/libQtGui.so: undefined reference to `ts_read_raw'

   這樣的問題

3.進入arm464-qte/src/gui/itemviews/qabstractitemview.cpp第2311行,將'Key_BackSpace' 更改為將'Key_Backspace'

   避免出現itemviews/qabstractitemview.cpp:2311: error: 'Key_BackSpace' is not a member of 'Qt'這樣的問題

4.配置
./configure -prefix /usr/local/arm481 -release -opensource -shared -fast -no-largefile -qt-sql-sqlite -no-exceptions -stl -no-qt3support -no-webkit -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg -qt-libpng -qt-libjpeg -make libs -nomake examples -nomake docs -nomake
demo -no-nis -no-cups -no-iconv -no-dbus -no-openssl -xplatform qws/linux-arm-g++ -embedded arm -little-endian -host-little-endian -qt-freetype -depths 8,16,24 -qt-gfx-linuxfb -no-gfx-vnc -no-gfx-qvfb -no-gfx-transformed -no-gfx-multiscreen -qt-mouse-tslib
-I/usr/local/tslib/include -L/usr/local/tslib/lib -no-glib

如果選上了-webkit會出Package gstreamer-app-0.10 not found的錯誤。

5.gmake

    gmake install

 

 

6.進入x86-qte

  ./configure ......-qt-mouse-qvfb -qt-gfx-qvfb -qt-kbd-qvfb -embedded x86 -xplatform qws/linux-x86-g++...去掉有關tslib的

  gmake

  gmake install

7.進入x11-qt

./configure -no-webkit -qvfb

gmake

gmake install

8. cd x11-qt/tools/qvfb

    make

    make install

   如果出現X11/extensions/XTest.h:沒有那個檔案或目錄這樣的錯誤

    redhat enterprise 6要安裝libXtst-1.0.99.2-3.el6.i686.rpm這個包

     ubuntu執行命令:sudo apt-get install xorg-dev

   搞定

 

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.