繁体   English   中英

使用Qt Creator交叉编译Qt应用程序的简便方法?

[英]Easy way to cross-compile a Qt application using Qt Creator?

我对C ++和Qt Creator还是很陌生,我在Mac OS X中使用Qt Creator。是否也有一种简便的方法可以针对Windows和Linux平台进行编译? 我目前的做法是将源文件复制到Windows计算机(使用Qt)并进行编译,这需要很多时间。

有没有可以同时获得所有3个可执行文件的命令或东西?

开箱即用不支持,您可能最终会在不同口味之间陷入混乱

我强烈建议您实现以下目标:

- to use either centralised (svn) or distributed (git, hg) SCM
- to use continuus integration with 3 agents, each one in a different platform (can be VM or physical computer).  You can use hudson or cruise control

这条路:

- you develop locally, on whatever platform you prefer
- you push / commit / submit your changes
- the buildbox compiles on all platforms (while you can still work on the next feature)
- ideally, you run your unit tests as well
- once all builds on all platforms are finished, you got a status and a build on all targets

当要处理多个版本的Qt或编译器时,这是非常有用的:返回值绝对值得在设置中投入时间(并且可以很好地扩展)

这绝非易事, 奇趣科技不喜欢这个主意(通过使它比应有的难度更大)。

Internet 上的Linux上可以交叉编译Qt / Win Apps,这将有所帮助(仅Mac的目录可能不同,命令应该相同)。

交叉编译后,您需要使用自定义PATH创建Qt Creator的快捷方式,该目录的交叉编译器目录位于PATH的其余部分之前。 这样,您可以确保使用它。 但是不建议这样做。

为什么不只使用正确设置的VM?

暂无
暂无

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

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