• qt5.9.8 IMX 平台编译


    1、与QT平行目录创建一个文件夹qt5-build,进行shadow build
    配置configure脚本如下:
    ../qt-everywhere-opensource-src-5.9.8/configure -prefix /home/wangll/practice/QT/qt
    -opensource
    -release
    -no-pch
    -confirm-license
    -xplatform arm-poky-linux-gnueabi-g++
    -qt-zlib
    -no-iconv
    -no-gif
    -qt-libjpeg
    -no-opengl
    -skip qtdeclarative
    -skip qtquickcontrols
    -skip qtquickcontrols2
    -no-qml-debug
    -no-cups
    -no-glib
    -no-dbus
    -no-rpath
    -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2
    -no-avx
    -no-openssl
    -nomake tools
    -qreal float
    -qt-libpng
    -sysroot /data/toolchain/imx-a7/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi
    -nomake examples
    -I /data/toolchain/imx-a7/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi/usr/include/ -L /data/toolchain/imx-a7/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi/usr/lib/
     
    2、创建IMX平台的目录:
    qt-everywhere-opensource-src-5.9.8/qtbase/mkspecs/arm-poky-linux-gnueabi-g++
    3、在目录arm-poky-linux-gnueabi-g++下,创建并修改qmake.conf 如下:
    #
    # qmake configuration for building with arm-linux-gnueabi-g++
    #
     
    MAKEFILE_GENERATOR = UNIX
    CONFIG += incremental
    QMAKE_INCREMENTAL_STYLE = sublib
    QT_QPA_DEFAULT_PLATFORM = linuxfb
    QMAKE_CFLAGS_RELEASE += -O2 -march=armv7-a -mfloat-abi=hard
    QMAKE_CXXFLAGS_RELEASE += -O2 -march=armv7-a -mfloat-abi=hard
     
    include(../common/linux.conf)
    include(../common/gcc-base-unix.conf)
    include(../common/g++-unix.conf)
     
    # modifications to g++.conf
    QMAKE_CC = arm-poky-linux-gnueabi-gcc
    QMAKE_CXX = arm-poky-linux-gnueabi-g++
    QMAKE_LINK = arm-poky-linux-gnueabi-g++
    QMAKE_LINK_SHLIB = arm-poky-linux-gnueabi-g++
     
    # modifications to linux.conf
    QMAKE_AR = arm-poky-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY = arm-poky-linux-gnueabi-objcopy
    QMAKE_NM = arm-poky-linux-gnueabi-nm -P
    QMAKE_STRIP = arm-poky-linux-gnueabi-strip
    load(qt_config)
     
    4、在目录arm-poky-linux-gnueabi-g++下创建文件qplatformdefs.h,并添加内容如下:
    #include "../linux-g++/qplatformdefs.h"

  • 相关阅读:
    关于 CommonJS AMD CMD UMD 规范
    如何成为一名卓越的前端工程师
    javascript 中 void 0的含义及undefine于void 0区别
    原生js获取样式表:currentStyle与defaultView的区别 真实例子
    attachEvent与addEventListener的区别 真实例子
    将图片转换成黑白(灰色、置灰)
    前端图片缓存问题
    html里的<wbr>标签什么意思
    关于SQL SERVER中的FLOAT转换为VARCHAR
    记一次工作需求: RSA密钥之C#格式与Java格式转换
  • 原文地址:https://www.cnblogs.com/wangwangever/p/14049035.html
Copyright © 2020-2023  润新知