簡體   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