Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to compile the ARM version of QT Library

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to compile the ARM version of the QT library, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Compile the ARM version QT library

1. Install the cross-compilation environment arm-linux-gcc and set the environment variables.

two。 Compile and install the library tslib1.4.tar.gz related to the touch screen proofreading display. For specific steps, refer to Mini2440 porting qt-extended4.4.3. It is important to note that when compiling, you need to set the compilation chain to use arm-linux-g++. Specify through the following command.

. / configure--host=arm-linux-- cache-file=arm-linux.cache\ PLUGIN_DIR=/usr/local/arm/tslib/plugins\-prefix=/usr/local/arm/tslib/build-host=arm-linux-- cache-file=arm-linux.cache2 > & 1 | tee conf_log

3. Cross-compile and install qt library qt-everywhere-opensource-src-4.6.4.tar.gz. Refer to Qtcreator configuration and cross-compile arm programs for specific steps. At the same time, you also need to set the compilation chain to use arm-linux-g++. Specify through the following command.

. / configure-opensource-embedded arm- xplatform qws/linux-arm-g++-no-webkit-qt-libtiff-qt-libmng-qt-mouse-tslib-qt-mouse-pc-no-mouse-linuxtp-prefix / opt/Qt4.6.4_forArm-I / usr/local/arm/tslib/tslib/include-L / usr/local/arm/tslib/tslib/lib set QTCreater to cross-compile the application

There are three main steps: set the QT version (Qt-embeded-arm library location)-set the compiler (arm-linux-g++)-set the build suite

For specific steps, refer to Qtcreator configuration and cross-compilation of arm programs

Transfer files to ARM

1. Establish a FTP connection. Ftp 202.201..

two。 Switch to the directory lcd / home/huang/Desktop/Quantizer4ARM/build-Quantizer-ARM-Debug where the files need to be transferred

3. Transfer file put Quantizer

4. Run the QT program. / Quantizer-qws

Solution to the failure of touch screen

The main idea is to use FriendlyARM's startup script. Modify the / bin/qt4 script to the following AppLauncher.sh to start the application.

#! / bin/shexport TSLIB_TSDEVICE=/dev/input/event0 export TSLIB_CONFFILE=/usr/local/etc/ts.confexport TSLIB_PLUGINDIR=/usr/local/lib/tsexport TSLIB_CALIBFILE=/etc/pointercalexport LD_LIBRARY_PATH=/export PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/binexport QWS_DISPLAY=:1TS_INFO_FILE=/sys/devices/virtual/input/input0/ueventif [- e $TS_INFO_FILE-a "/ bin/grep-Q TouchScreen < $TS_INFO_FILE"] Thenexport QWS_MOUSE_PROTO= "Tslib:/dev/input/event0 MouseMan:/dev/input/mice" if [!-s / etc/pointercal]; thenrm / etc/pointercal/usr/local/bin/ts_calibratefielseexport QWS_MOUSE_PROTO= "MouseMan:/dev/input/mice" fiunset TS_INFO_FILEexport QWS_KEYBOARD=TTY:/dev/tty1export HOME=/rootcd / usr/local/Trolltech/QtEmbedded-4.6.3-arm/demos/embedded/fluidlauncher$1-qwshotplug

Use. / AppLauncher.sh. / Quantizer to open the QT application. For specific steps, please refer to the touch screen failure of Qt under mini2440 and the solution to the problem that the library file cannot be found.

QT version issu

There is an error running the program on the development board

. / Quantizer: symbol lookup error:. / Quantizer: undefined symbol: _ ZNK6QImage13constScanLineEi

The program uses to read pictures.

Const uchar * pSrc = (uchar *) image.constScanLine (I)

This is the version of Qt 4.8, the QT-embedded-qt library compiled on PC is version 4.8.6, and the dynamic link library in the ARM development board is version 4.6.3.

Change the code to

Uchar * pSrc = (uchar *) image.scanLine (I)

It can work normally.

The above is all the contents of the article "how to compile the ARM version of the QT Library". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report