ubuntu下給raspy pi2 編譯qt5庫

交叉編譯時,一般要準備mkspec, 參考: http://wiki.qt.io/Building_Qt_for_Embedded_Linuxhtml

mkspec包含兩個文件:linux

  1. qmake.conf- This is a list of qmake variable assignments that tells qmake what flags to pass through to the compiler, which compiler to use etc.
  2. qplatformdefs.h - This is a header file with various platform-specific #includes and #defines. Often this just refers to an existing qplatformdefs.h file from another generic mkspec.

參考 http://doc.qt.io/qt-5/embedded-linux.htmlui

能夠知道, qt已經爲pi2準備了mkspec, 咱們只要在編譯配置的時候,指定便可.this

./configure -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=$TOOLCHAIN/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot $ROOTFS -prefix /usr/local/qt5 -fontconfig -eglfs orm

相關文章
相關標籤/搜索