한국어
Embedded

Build Qt 4.7.0 for Embedded Linux

makersweb 2015.05.25 01:26 조회 수 : 4418

Build Qt 4.7.0 for Embedded Linux

Environment
raspberry pi 2
g++ 4.8

1. download source
https://download.qt.io/archive/qt/

2. unpacking the archive

#tar zxvf qt-everywhere-opensource-src-4.7.0.tar.gz 


3. edit qmake.conf

#cd mkspecs/qws/linux-arm-g++


-rw-r--r-- 1 pi users  520 Sep 10  2010 qmake.conf

-rw-r--r-- 1 pi users 1984 Sep 10  2010 qplatformdefs.h


#vi qmake.conf


qmake.conf

#

# qmake configuration for building with arm-linux-g++

#


include(../../common/g++.conf)

include(../../common/linux.conf)

include(../../common/qws.conf)


# modifications to g++.conf

QMAKE_CC                = arm-linux-gnueabihf-gcc

QMAKE_CXX               = arm-linux-gnueabihf-g++

QMAKE_LINK              = arm-linux-gnueabihf-g++

QMAKE_LINK_SHLIB        = arm-linux-gnueabihf-g++


# modifications to linux.conf

QMAKE_AR                = arm-linux-gnueabihf-ar cqs

QMAKE_OBJCOPY           = arm-linux-gnueabihf-objcopy

QMAKE_STRIP             = arm-linux-gnueabihf-strip


load(qt_config) 



4. configure

#./configure -embedded arm -xplatform qws/linux-arm-g++ -little-endian -host-little-endian

Which edition of Qt do you want to use ?


Type 'c' if you want to use the Commercial Edition.

Type 'o' if you want to use the Open Source Edition.


o 

-xplatform qws/linux-arm-g++ 는 크로스 컴파일(target platform)로 아까수정해준 qws/linux-arm-g++ 폴더에 qmake.conf파일을 참조하라는 옵션

-little-endian 타겟플랫폼이 little endian (LSB first)이라고 알려주는 옵션


You have not explicitly asked to use pkg-config and are cross-compiling.

pkg-config will not be used to automatically query cflag/lib parameters for

dependencies



This is the Qt for Embedded Linux Open Source Edition.


You are licensed to use this software under the terms of

the Lesser GNU General Public License (LGPL) versions 2.1.

You are also licensed to use this software under the terms of

the GNU General Public License (GPL) versions 3.


Type '3' to view the GNU General Public License version 3.

Type 'L' to view the Lesser GNU General Public License version 2.1.

Type 'yes' to accept this license offer.

Type 'no' to decline this license offer.


Do you accept the terms of either license? yes

 


Qt is now configured for building. Just run 'make'.

Once everything is built, you must run 'make install'.

Qt will be installed into /usr/local/Trolltech/QtEmbedded-4.7.0-arm


To reconfigure, run 'make confclean' and 'configure 


5. make

#make 


6. make install

#make install