Compile qt-2.3.10

本文介绍如何为 Linux/i386 和 ARM 平台编译 Qt 2.3.10,并详细展示了配置步骤及环境变量设置方法。包括构建环境的搭建、编译参数说明、运行示例程序等关键环节。
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> @font-face{ font-family:"Times New Roman"; } @font-face{ font-family:"宋体"; } @font-face{ font-family:"Symbol"; } @font-face{ font-family:"Arial"; } @font-face{ font-family:"黑体"; } @font-face{ font-family:"Courier New"; } @font-face{ font-family:"Wingdings"; } @font-face{ font-family:"Courier New CYR"; } p.0{ margin:0pt; margin-bottom:0.0001pt; layout-grid-mode:char; text-align:justify; font-size:10.5000pt; font-family:'Times New Roman'; } h3{ margin-bottom:13.0000pt; margin-top:13.0000pt; layout-grid-mode:char; page-break-after:void; text-align:justify; line-height:172%; font-weight:bold; font-size:16.0000pt; font-family:'Times New Roman'; } p.15{ margin-left:42.0000pt; layout-grid-mode:char; text-align:justify; font-size:10.5000pt; font-family:'Times New Roman'; } div.Section0{ margin-top:72.0000pt; margin-bottom:72.0000pt; margin-left:90.0000pt; margin-right:90.0000pt; size:595.3000pt 841.9000pt; }</style>

Compileqt-2.3.10

Compileqt-2.3.10forLinux/i386platform1

Compileqt-2.3.10forLinux/ARMplatform2

Compileqt-2.3.10forLinux/i386platform

#SettingUptheLinux/i386 BuildEnvironment

#!/bin/sh

exportQTEDIR=`pwd`

exportQTDIR=$QTEDIR

./configure\

-shared\

-xplatformlinux-x86-g++\

-qvfb\

-system-jpeg\

-qt-libpng\

-depths16\

-keypad-mode\

-debug

#BuildingforaLinux/i386 TargetPlatform

Make

#RunningQTSoftware

1.RunQVFBandconfigure

qvfb&

2.Runexample

./tutorial/t1-qws

Compileqt-2.3.10forLinux/ARMplatform

#prepare

modifyconfigs/linux-arm-[share/static][-debug]LINKoption

...

SYSCONF_LINK=arm-linux-gcc

...

SYSCONF_LINK_SHLIB=arm-linux-gcc

...

replacearm-linux-gccbyarm-linux-g++

SYSCONF_LINK=arm-linux-g++

SYSCONF_LINK_SHLIB=arm-linux-g++

#SettingBuildPlatformEnvironmentVariablesforSupportingSoftware

SettheQTDIRandQTEDIRvariable

exportQTEDIR=`pwd`

exportQTDIR=$QTEDIR

#SettingUptheLinux/ARMBuildEnvironment

Usesystem'sjpeglibrary

./configure-xplatformlinux-arm-g++-no-opengl-qt-libpng-qt-zlib-no-xft-no-qvfb-L/home/opt/mx21_tools/metrowerks/b56/Embedix/home/salem/project/MX21-b56/build/dev_image/usr/lib-system-jpeg-I/work/qt/include-L/work/qt/lib-ljpeg-no-xkb-shared-release-gif

find.-nameMakefile|xargsperl-p-i-e's/-lqte/-lqte-L\/work\/qt\/lib-ljpeg/g'

#BuildingforaLinux/ARMTargetPlatform

make

#RunningQTSoftware

Mountnfsfilesystem

mkdir/work/nfs

mount-tnfs10.30.32.8:/work/work

cd/work/qt-2.3.10

SetthePlatformEnvironmentVariablesformx21targetplatform

exportQWS_MOUSE_PROTO=

exportQWS_KEYBOARD=MX21

exportQTEDIR=`pwd`

exportQPEDIR=`pwd`

exportQTDIR=`pwd`

exportPATH=$QPEDIR/bin:$PATH

exportLD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/work/mx21/mx21_lib:./

exportLD_LIBRARY_PATH=$QPEDIR/lib:$LD_LIBRARY_PATH

exportQTOPIA_PHONE_DEVICE="sim:localhost"

Runexample

./tutorial/t1-qws

root@ubuntu:/qt-everywhere-src-5.12.12# vim qtbase/mkspecs/linux-mips-g++/qmake.conf root@ubuntu:/qt-everywhere-src-5.12.12# ./run.sh + cd qtbase + /qt-everywhere-src-5.12.12/qtbase/configure -top-level -prefix /opt/Qt5.12.12-mips -static -release -opensource -make libs -xplatform linux-mips-g++ -optimized-qmake -pch -qt-libjpeg -qt-zlib -no-opengl -skip qtlocation -skip qt3d -skip qtcanvas3d -skip qtpurchasing -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 -qt-zlib -no-openssl -no-xcb -no-cups -no-iconv -no-evdev -no-icu -no-fontconfig -nomake examples -nomake tools -skip qtvirtualkeyboard -qpa linuxfb -no-opengl -no-libinput -no-gstreamer -no-system-proxies -no-slog2 -no-lgmon -linuxfb -v -qt-libjpeg -qt-libpng -no-libproxy -no-dbus -no-glib -no-compile-examples Creating qmake... -g -I/qt-everywhere-src-5.12.12/qtbase/qmake -I/qt-everywhere-src-5.12.12/qtbase/qmake/library -I/qt-everywhere-src-5.12.12/qtbase/qmake/generators -I/qt-everywhere-src-5.12.12/qtbase/qmake/generators/unix -I/qt-everywhere-src-5.12.12/qtbase/qmake/generators/win32 -I/qt-everywhere-src-5.12.12/qtbase/qmake/generators/mac -I/qt-everywhere-src-5.12.12/qtbase/include -I/qt-everywhere-src-5.12.12/qtbase/include/QtCore -I/qt-everywhere-src-5.12.12/qtbase/include/QtCore/5.12.12 -I/qt-everywhere-src-5.12.12/qtbase/include/QtCore/5.12.12/QtCore -I../src/corelib/global -I/qt-everywhere-src-5.12.12/qtbase/mkspecs/linux-g++ -DQT_VERSION_STR=\"5.12.12\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=12 -DQT_VERSION_PATCH=12 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_FOREACH /qt-everywhere-src-5.12.12/qtbase/qmake/main.cpp ’ Makefile:246: recipe for target &#39;main.o&#39; failed make: *** [main.o] Error 1 root@ubuntu:/qt-everywhere-src-5.12.12# ls _clang-format qtconnectivity qtseria
09-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值