Qt5 -- arm porting

Source: Internet
Author: User

I used qt4.6 earlier and made some programs. I feel that the writing interface with C ++ is quite smooth.

If qt5 is available, you must try it.

Try cross-compilation first, because the compilation on PC is normal.

Cross-compilation generally requires consideration of the display mode, whether the acceleration hardware is displayed, whether there is a touch screen, or whether there is a keyboard.

Download qt5, http://releases.qt-project.org/qt5/5.0.1/single/qt-everywhere-opensource-src-5.0.1.tar.gz

2. Decompress

3. modify the configuration file qmake. conf, qtbase/mkspecs/Linux-arm-gnueabi-G ++/qmake. conf.

#
# Qmake configuration for building with arm-Linux-gnueabi-G ++
#

Makefile_generator = Unix
Config + = Incremental gdb_dwarf_index
Qmake_incremental_style = sublib

Qt_qpa_default_platform = linuxfb
Qmake_cflags_release + =-O2-March = armv5te
Qmake_cxxflags_release + =-O2-March = armv5te

Include (../common/Linux. conf)
Include (../common/gcc-base-unix.conf)
Include (../common/g ++-Unix. conf)

# Modifications to G ++. conf
Qmake_cc = arm-None-Linux-gnueabi-gcc
Qmake_cxx = arm-None-Linux-gnueabi-G ++
Qmake_link = arm-None-Linux-gnueabi-G ++
Qmake_link_shlib = arm-None-Linux-gnueabi-G ++

# Modifications to Linux. conf
Qmake_ar = arm-None-Linux-gnueabi-ar cqs
Qmake_objcopy = arm-None-Linux-gnueabi-objcopy
Qmake_strip = arm-None-Linux-gnueabi-strip
Load (qt_config)

4. Compile the script, arm_config

Make clean
./Configure-V \
-Prefix/home/ALSA/cqtlib/emb5.0 /\
-Confirm-license \
-Opensource \
-Release \
-Make libs \
-Xplatform Linux-arm-gnueabi-G ++ \
-Optimized-qmake \
-PCH \
-QT-SQL-SQLite \
-QT-libjpeg \
-QT-zlib \
-No-OpenGL \
-No-SSE-no-sse2 \
-No-OpenSSL \
-No-NIS \
-No-cups \
-No-glib \
-No-xcursor-no-xfixes-no-xrandroid-no-xrender \
-No-separate-debug-Info \
-Nomake examples-nomake tools-nomake docs

5. Execute the arm_config file to generate QT-related projects.

6 Make

An error occurred while making: qtextcodec. cpp undefined reference to '_ sync_bool_compare_and_swap_4

Someone found this wrong http://qt-project.org/forums/viewthread/16071.

It should be a problem with the compiler. Currently, arm-None-Linux-gnueabi 4.4 is used for compilation. It is estimated to be a little higher, such as version 4.7 or 4.6 ..

Waiting for trial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.