编译 qt-everywhere-opensource-src-4.6.2.tar

编译 qt-everywhere-opensource-src-4.6.2.tar

for 嵌入式 arm版本

$export CPLUS_INCLUDE_PATH=/home/dengroj/arm_china_tools/arm-none-linux-gnueabi/include/c++/4.4.1:/home/dengroj/arm_china_tools/arm-none-linux-gnueabi/include/c++/4.4.1/arm-none-linux-gnueabi


修改qt-everywhere-opensource-src-4.6.2/mkspecs/qws/linux-arm-g++/qmake.conf 文件(添加lts参数):
QMAKE_CC                = arm-linux-gcc -lts
QMAKE_CXX               = arm-linux-g++ -lts
QMAKE_LINK              = arm-linux-g++ -lts
QMAKE_LINK_SHLIB        = arm-linux-g++ -lts
这一步必须有,不然肯定出错。


# ./configure /
-prefix /usr/local/Trolltech/QtEmbedded-4.6.2-arm /
-opensource /
-confirm-license /
-release -shared /
-embedded arm /
-xplatform qws/linux-arm-g++ /
-depths 16,18,24 /
-fast /
-optimized-qmake /
-pch /
-qt-sql-sqlite /
-qt-libjpeg /
-qt-zlib /
-qt-libpng /
-qt-freetype /
-little-endian -host-little-endian /
-no-qt3support /
-no-libtiff -no-libmng /
-no-opengl /
-no-mmx -no-sse -no-sse2 /
-no-3dnow /
-no-openssl /
-no-webkit /
-no-qvfb /
-no-phonon /
-no-nis /
-no-opengl /
-no-cups /
-no-glib /
-no-xcursor -no-xfixes -no-xrandr -no-xrender /
-no-separate-debug-info /
-nomake examples -nomake tools -nomake docs /
-qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib


====>>>上面缩略成这样
./configure -prefix /usr/local/Trolltech/QtEmbedded-4.6.2-arm -opensource -confirm-license -release -shared -embedded arm -xplatform qws/linux-arm-g++ -depths 16,18,24 -fast -optimized-qmake -pch -qt-sql-sqlite -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -little-endian -host-little-endian -no-qt3support -no-libtiff -no-libmng -no-opengl -no-mmx -no-sse -no-sse2 -no-3dnow -no-openssl -no-webkit -no-qvfb -no-phonon -no-nis -no-opengl -no-cups -no-glib -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -nomake examples -nomake tools -nomake docs -qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib


出现这个问题。
/tmp/qt/src/corelib/tools/qlocale.cpp: In function ‘char* qdtoa(double, int, int, int*, int*, char**, char**)’:
/tmp/qt/src/corelib/tools/qlocale.cpp:6541: error: ‘fenv_t’ was not declared in this scope
/tmp/qt/src/corelib/tools/qlocale.cpp:6541: error: expected ‘;’ before ‘envp’
/tmp/qt/src/corelib/tools/qlocale.cpp:6542: error: ‘envp’ was not declared in this scope
/tmp/qt/src/corelib/tools/qlocale.cpp:6542: error: ‘feholdexcept’ was not declared in this scope
/tmp/qt/src/corelib/tools/qlocale.cpp:6557: error: ‘fesetenv’ was not declared in this scope
make: *** [qlocale.o] Error 1

原因是交叉编译器版本问题。我用的是4.4.1,按它的4.1.2来弄吧。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值