【问题标题】:How to cross compile qt for embedded linux in QT Creator Open Source version如何在 QT Creator 开源版本中为嵌入式 linux 交叉编译 qt
【发布时间】:2019-04-22 05:40:45
【问题描述】:

我想将我的 QT 应用程序交叉编译到 Toradex 嵌入式 linux 平台。 QT Creator 商业版带有内置的嵌入式 linux 编译器,但开源没有。

那么,有没有办法在嵌入式linux上编译运行呢。

【问题讨论】:

  • 你看过他们现有的文档here吗?它应该已经在那里了。
  • @SanchayanMaity 是 QT 商业版,不是社区版。
  • Yocto/OE可以包含的不是商业版。

标签: c++ qt qt-creator embedded-linux


【解决方案1】:
After some research, I finally get a way to do it. Here are the steps:

1. Download QT Creator and Install

2. Download QT Everywhere
https://download.qt.io/archive/qt/5.8/5.8.0/single/qt-everywhere-opensource-src-5.8.0.tar.gz.mirrorlist

3. Extract It

4. Change path to path/to/qt-everywhere

5. Configure qt-everywhere

    ./configure -release -device linux-imx7-g++ -device-option CROSS_COMPILE=/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi- -sysroot /usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi -skip qtwebengine -skip qtwebkit -skip qtwebkit-examples -prefix /usr/local/qt5-imx

(QT will save on the location listed in prefix, i.e here /usr/local/qt5-imx)

6. Open QT Creator

7. Goto Tools->Options, Add Compiler
-> Add GCC Compiler, add path /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-g++

8. Add QT Version:
path: /usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/local/qt5-imx/bin/qmake

9. Add Debugger :
path: /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-gdb

10. Add Kit
-> Select Generic Linux Device:
-> Specify GCC compiler and debugger path, which is created above
-> Add Sysroot location: /usr/local/oecore-x86_64/sysroots
-> Add QT Version: select qt version, created above
-> Apply and Close

【讨论】:

  • 您似乎正在使用 OE 基于您的工具链构建的 SDK。为什么不使用 meta-qt5 层来支持 Qt?
猜你喜欢
  • 1970-01-01
  • 2016-03-26
  • 1970-01-01
  • 2011-03-13
  • 1970-01-01
  • 1970-01-01
  • 2023-03-29
  • 2012-07-15
  • 1970-01-01
相关资源
最近更新 更多