简体   繁体   English

使用Qt ARM预构建二进制文件进行交叉编译

[英]Using Qt ARM prebuilt binaries to cross-compile

I have a small ARM board with Arch Linux ARM distro. 我有一个带有ARM Linux ARM发行版的小型ARM板。 There are ARM Qt 5.5.0 binaries available in the repositories. 存储库中提供了ARM Qt 5.5.0二进制文件。

I want to cross-compile a program using Qt for that board on my Ubuntu Trusty x86_64 virtual machine. 我想在我的Ubuntu Trusty x86_64虚拟机上使用Qt为该板交叉编译程序。 Do I need to cross-compile Qt from source first or there is a way to reuse prebuilt ARM binaries? 我是否需要首先从源代码交叉编译Qt,或者有一种方法可以重用预构建的ARM二进制文件?

I mean, when I try to set a Qt kit in Qt Creator, it wants me to point to qmake executable. 我的意思是,当我尝试在Qt Creator中设置Qt工具包时,它希望我指向qmake可执行文件。 And ARM executable isn't, well, executable on my build machine. 并且ARM可执行文件在我的构建计算机上不可执行 So it seems I need to build Qt in order to get qmake. 所以我似乎需要构建Qt才能获得qmake。 But then it comes with its own set of libraries and I'm not sure I can replace them. 但随后它带有自己的一套库,我不确定我可以替换它们。

Depending on how much memory you have on your ARM board you could consider to compile directly on your board. 根据ARM板上的内存量,您可以考虑直接在电路板上编译。 You then have to install the dev package of Qt. 然后你必须安装Qt的开发包。

On the Orange Pi One board I can even run Qt Creator directly on the board. 在Orange Pi One主板上,我甚至可以直接在主板上运行Qt Creator。 On smaller boards which don't have a HDMI output I run a VNC server and use the Qt Creator running on the board by a window on my host computer which is connected to the board over Wifi. 在没有HDMI输出的较小电路板上,我运行一个VNC服务器,并通过主机上的窗口使用板上运行的Qt Creator,该窗口通过Wifi连接到电路板。

On even smaller boards I usually create my own image using buildroot which is very comfortable and supports development and cross-compilation using Qt Creator on the host machine. 在更小的主板上,我通常使用buildroot创建自己的图像,这非常舒适,并且支持在主机上使用Qt Creator进行开发和交叉编译。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM