简体   繁体   English

Qt-Creator为Raspberry Pi交叉编译

[英]Qt-Creator cross compile for Raspberry Pi

I'm looking for a way to cross-compile my C++ project in Qt-Creator. 我正在寻找一种在Qt-Creator中交叉编译我的C ++项目的方法。 I have the arm-gcc set up and ready, but i cannot figure out how to setup the right kit for building in qt-creator. 我已经设置好了arm-gcc,但是我不知道如何设置在qt-creator中构建正确的工具包。

Does anyone have a working kit config for that? 有人为此提供工作套件配置吗?

Thank you very much. 非常感谢你。

To build a custom kit for cross-compilation in Qt Creator, you have to have the toolchain (which you have) and a cross compiled Qt library. 要在Qt Creator中构建用于交叉编译的自定义工具包,您必须拥有工具链(具有)和交叉编译的Qt库。

If you do not have a cross compiled Qt library, there's a wiki article to building Qt for Raspberry Pi. 如果您没有交叉编译的Qt库,则有一篇维基文章为Raspberry Pi构建Qt。 It also explains how to set up a kit. 它还说明了如何设置套件。

To sum it up though in case those who are similarly confused. 总结一下,以防那些同样困惑的人。

Under Options > Build & Run > Compilers, add your toolchain by pointing by locating your arm-linux-gcc or similar compiler. 在“选项”>“构建和运行”>“编译器”下,通过找到arm-linux-gcc或类似的编译器进行指向来添加工具链。

Then under Qt Versions tab, add the path to your cross-compiled qt library by locating the subseqent cross-compiled qmake binary. 然后在“ Qt版本”选项卡下,通过找到子序列交叉编译的qmake二进制文件,将路径添加到交叉编译的qt库。

Finally, you bring those items together under the Kits tab where you add a kit, name it, select your compiler well as your Qt version you added. 最后,在“工具”选项卡下将这些项目放在一起,在其中添加工具箱,为其命名,选择编译器以及所添加的Qt版本。

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

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