码迷,mamicode.com
首页 > Web开发 > 详细

ubuntu下给raspy pi2 编译qt5库

时间:2015-11-04 23:01:16      阅读:318      评论:0      收藏:0      [点我收藏+]

标签:

交叉编译时,通常要准备mkspec, 参考: http://wiki.qt.io/Building_Qt_for_Embedded_Linux

mkspec包含两个文件:

  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.html

可以知道, qt已经为pi2准备了mkspec, 我们只要在编译配置的时候,指定即可.

./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 

 

ubuntu下给raspy pi2 编译qt5库

标签:

原文地址:http://www.cnblogs.com/zhangjiankun/p/4937678.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!