如何为 imx6 交叉编译 QT 应用程序? [英] How do I cross-compile a QT application for imx6?

查看:21
本文介绍了如何为 imx6 交叉编译 QT 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为 Freescale Hummingboard(imx6(arm)) 交叉编译 QT 应用程序?

How do I cross-compile a QT application for a Freescale Hummingboard(imx6(arm))?

周围有一些指南,但我无法成功完成其中一个.

There are some guides around, but I've not been able to complete one with success.

以下(以及更多)指南在 ./configure 上给我一个编译错误http://forum.solid-run.com/linux-on-cubox-i-and-hummingboard-f8/qt5-3-on-hummingboard-t2072.htmlhttps://community.freescale.com/docs/DOC-94066当我运行 ./configure 命令时(使用推荐的命令,我已经尝试了很多命令的可能性,但没有任何工作).QT 使用的所有外部库(zlib、libjpeg、libpng 等)都出现编译错误.所以从那里开始是死胡同.

The following (and more) guides give me a compile error on ./configure http://forum.solid-run.com/linux-on-cubox-i-and-hummingboard-f8/qt5-3-on-hummingboard-t2072.html https://community.freescale.com/docs/DOC-94066 When I run the ./configure command (With recommended commands, I've tried this with a lot of possibilities for commands but got none working). I got a compile error for all the external libraries QT uses (zlib, libjpeg, libpng, etc.). So it's a dead end from there.

我尝试了很多东西,我什至不记得我尝试过的所有东西,但我什么都做不了.

I've tried a lot more stuff, I don't even remember all the stuff I've tried, but I got nothing working.

我正在尝试为 Hummingboard 使用小型分发版.这是一个没有窗口管理器的系统,可以运行 QT 应用程序 (QT5).我尝试使用的构建工具是 gcc-linaro-arm-linux-gnueabi,我使用的是 QT Creator.我让 QT 在 Hummingboard 上工作,但我无法为它编译任何东西.

I'm trying to use mini-distribution for the Hummingboard. It's a system without window manager that is able to run QT applications (QT5). The build tool I'm trying to use is gcc-linaro-arm-linux-gnueabi, I'm using QT Creator. I've got QT working on the Hummingboard, I just can't compile anything for it.

推荐答案

我终于成功地为 IMX6 构建了一个应用程序.这是我为其他人所做的.这不是最佳解决方案,但它是一个解决方案.

I managed building an application for the IMX6 finally. Here is how I did it for other's. It's not an optimal solution but it is an solution.

我使用 Buildgear 将迷你发行版构建为操作系统(谷歌它,没有足够的链接与我的声誉).我将我自己的应用程序附加到这个迷你发行版来构建它.这是通过在 buildfiles/cross/cross-hummingboard 文件夹中创建一个文件夹并添加一个构建文件来完成的(我的看起来像这样 http://pastebin.com/bZkJUiry).在这个文件夹中,我还放置了一个 .tar 的项目文件(包括 .pro).为了构建它,我将qt-gui"作为依赖项添加到 fs (buildfiles/cross/cross-hummingboard/fs) 中,方法是将其添加到依赖项列表中.

I use Buildgear to build mini-distirbution as OS (Google it, not enough links with my reputation). I append my own application to this mini-distribution to also build it. This is done by placing creating a folder in the buildfiles/cross/cross-hummingboard folder and adding a buildfile (mine look like this http://pastebin.com/bZkJUiry). In this folder I also place a .tar of the project files (including the .pro). To get it to build I add "qt-gui" as a dependency to the fs (buildfiles/cross/cross-hummingboard/fs) by adding it to the list of depends.

然后我运行 buildgear build fs,这将创建一个(Tarred)图像,包括我的(工作)qt 应用程序!然后我提取 ./qt-gui 可执行文件并将其 ssh 到 Hummingboard.

I then run buildgear build fs, which will create an (Tarred) image including my (working) qt-application! I then extract the ./qt-gui executable and ssh it to the Hummingboard.

当然这有点麻烦所以我做了一个脚本来自动化这一切:http://pastebin.com/jFM6rZyY它复制和 Tars 源,与 fs 一起编译,提取可执行文件,ssh 将文件传输到 hummingboard 并运行它.构建大约需要 3 分钟,但它有效,这对我来说很重要.

Of course this is all a bit cumbersome so I made a script that automates this all: http://pastebin.com/jFM6rZyY It copies and Tars sources, compiles it together with the fs, extracts the executable, ssh's the file to the hummingboard and runs it. Takes about 3 minutes building but it works which is what counts for me at this point.

这篇关于如何为 imx6 交叉编译 QT 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆