2016-12-14 146 views

回答

0

我configre命令行(不顧一切SYSROOT /前綴/ hostprefix/extprefix選項):

./configure -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -sysroot "$R" -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -make tools -prefix /usr/lib/arm-linux-gnueabihf/qt5 -extprefix /usr/lib/arm-linux-gnueabihf/qt5 -hostprefix /usr/lib/arm-linux-gnueabihf/qt5

(通知PI2,並且有可能是對PI3一個配置太)

而且一修補到qtbase中的文件(更改爲匹配您的gcc版本和路徑):

---------------- mkspecs/devices/linux-rasp-pi2-g++/qmake.conf ---------------- 
index 9be3f40..fcef488 100644 
@@ -11,11 +11,11 @@ QMAKE_INCDIR_EGL  = $$[QT_SYSROOT]/opt/vc/include \ 
          $$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads \ 
          $$[QT_SYSROOT]/opt/vc/include/interface/vmcs_host/linux 
QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL} 

QMAKE_LIBS_EGL   = -lEGL -lGLESv2 
-QMAKE_CFLAGS += -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux 
+QMAKE_CFLAGS += -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -I$$[QT_SYSROOT]/usr/include/c++/4.9/ -I$$[QT_SYSROOT]/usr/include/arm-linux-gnueabihf/c++/4.9 
QMAKE_CXXFLAGS   = $$QMAKE_CFLAGS 

DISTRO_OPTS += hard-float 

# Preferred eglfs backend 
相關問題