编译 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来弄吧。

你可能感兴趣的:(function,嵌入式,Path,include,tools,编译器)