自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

詳解 Qt 4.7.3在ARM 2440的移植實(shí)例

移動(dòng)開發(fā)
本文介紹的是詳解 Qt 4.7.3在ARM 2440的移植實(shí)例,不多說,先來看內(nèi)容。

Qt 4.7.3ARM 2440的移植實(shí)例是本文將要講解的內(nèi)容,此前反復(fù)試過Qt 4.7.0的在ARM上的移植,無奈這個(gè)版本的bug甚多,移植非常麻煩,遂堅(jiān)守4.6.3。

開發(fā)板:micro2440   內(nèi)核:2.6.33.5   arm-linux-g++:4.4.3,經(jīng)實(shí)測(cè),這個(gè)版本解決了Segmental Fault的問題。

先在開發(fā)板上移植tslib,此處略去。

以下是移植的全過程:

(1)下載qt-everywhere-opensource-src-4.7.3.tar.gz,并解壓到/opt/qt473src

(2)mkdir /opt/qt473target,cd /opt/qt473target,vim script,寫入如下configure選項(xiàng)(如果想查看Qt在Embedded Linux平臺(tái)上的configure選項(xiàng)幫助請(qǐng)cd /opt/qt473src,./configure -embedded -h)  

  1. ../qt473src/configure \  
  2. --prefix=/usr/local/qt473lib \  
  3. -release -opensource -shared -fast -confirm-license \  
  4. -no-largefile \  
  5. -no-exceptions \  
  6. -no-accessibility \  
  7. -no-stl \  
  8. -qt-sql-sqlite \  
  9. -no-qt3support \  
  10. -no-xmlpatterns \  
  11. -no-multimedia \  
  12. -no-audio-backend \  
  13. -no-phonon \  
  14. -no-phonon-backend \  
  15. -svg \  
  16. -no-webkit \  
  17. -no-javascript-jit \  
  18. -script \  
  19. -no-scripttools \  
  20. -declarative \  
  21. -no-mmx -no-3dnow -no-sse -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-neon \  
  22. -qt-zlib \  
  23. -qt-gif \  
  24. -no-libtiff \  
  25. -qt-libpng \  
  26. -no-libmng \  
  27. -qt-libjpeg \  
  28. -no-openssl \  
  29. -nomake docs \  
  30. -nomake examples \  
  31. -nomake tools \  
  32. -nomake demos \  
  33. -optimized-qmake \  
  34. -no-nis \  
  35. -no-iconv \  
  36. -no-cups \  
  37. -no-pch \  
  38. -xplatform qws/linux-arm-g++ \  
  39. -embedded arm \  
  40. -qt-freetype \  
  41. -depths 16,18,24 \  
  42. -no-opengl \  
  43. -qt-gfx-linuxfb -qt-gfx-transformed \  
  44. -no-gfx-qvfb -no-gfx-vnc -no-gfx-multiscreen -no-gfx-directfb -no-gfx-qnx \  
  45. -no-kbd-linuxinput -no-kbd-tty -no-kbd-qvfb -no-kbd-qnx \  
  46. -qt-mouse-tslib \  
  47. -no-mouse-pc -no-mouse-linuxtp -no-mouse-linuxinput -no-mouse-qvfb -no-mouse-qnx \  
  48. -no-glib 

在script里寫好以上配置后,保存退出,chmod 777 script,./script,開始配置Qt

(3)配置結(jié)束后,make make install

(4)完成后,將/usr/local/qt473lib之下的lib和plugin復(fù)制到開發(fā)板上的相同位置

(5)轉(zhuǎn)入開發(fā)板上的/etc,打開profile,加入以下內(nèi)容

  1. export QWS_MOUSE_PROTO=Tslib:/dev/input/event0  
  2. export QWS_SIZE=240X320 
  3. export QWS_DISPLAY=LinuxFb:mmWidth=50:mmHeight=70:0  
  4. export PATH=/usr/local/tslib/bin:$PATH  
  5. export LD_LIBRARY_PATH=/usr/local/qt473lib/lib:/usr/local/qt473lib/plugins/imageformats:/usr/local/tslib/lib:/usr/local/libjpeg-turbo/
  6. lib:$LD_LIBRARY_PATH  
  7. export QT_PLUGIN_PATH=/usr/local/qt473lib/plugins  
  8. export QT_QWS_FONTDIR=/usr/local/qt473lib/lib/fonts 

這些環(huán)境變量在Qt的幫助文檔中有詳細(xì)的說明,最后,不要忘了把a(bǔ)rm-linux-g++的庫文件復(fù)制到開發(fā)板的/lib下移植過程中遇到的問題:

(1)在開發(fā)板上插入usb鍵盤后,遇到了無法啟動(dòng)Qt程序的問題,進(jìn)程直接Stopped (tty Output),于是在/etc/profile中去掉了export QWS_KEYBOARD=Linuxinput:/dev/input/event1,在配置中也刪去了-qt-kbd-linuxinput,這個(gè)問題在Qt 4.6.3中沒有遇到過

(2)在運(yùn)行了基于QWSCalibratedMouseHandler編寫的觸摸屏校正程序之后,觸摸屏失效,于是直接調(diào)用Tslib校正觸摸屏,這個(gè)問題在Qt 4.6.3中也沒有遇到過

如果還是遇到了Segmental Fault問題,請(qǐng)參考http://www.friendlyarm.net/forum/topic/1854

小結(jié):詳解 Qt 4.7.3ARM 2440的移植實(shí)例的內(nèi)容介紹完了,希望本文對(duì)你有所幫助!更多內(nèi)容請(qǐng)參考編輯推薦。

責(zé)任編輯:zhaolei 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2011-06-24 17:05:07

QT QT 4.7.3 windows

2011-07-05 17:54:43

QT Sqlite ARM

2011-07-02 13:42:24

Qt 移植

2011-06-14 13:59:09

Qt Qt 4.7.3 MYsql

2010-09-07 14:05:15

Arm移植pppoe

2011-06-13 15:57:26

linux QT QTOPIA

2011-06-24 14:34:17

Qt 小票 打印

2011-07-01 18:35:17

QT 控制臺(tái)

2011-07-04 15:13:31

QT MPlayer 移植

2011-06-28 13:38:15

Arm linux QT

2011-06-13 11:24:55

QT MPlayer 移植

2011-06-13 11:07:22

QT 移植

2011-06-29 10:18:20

LINUX QT ARM

2011-06-28 10:03:37

Qt OpenCV qmake

2011-06-30 10:50:39

Qt OpenCV

2021-09-28 15:03:06

Linux內(nèi)核arm

2011-06-27 17:15:33

Qt creator Qt Creator

2011-06-15 18:20:20

Qt 移植 Android

2010-03-30 09:01:01

Oracle數(shù)據(jù)

2011-07-01 10:13:18

Ubuntu Qt
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)