简体   繁体   English

我应该在Linux或Windows中进行交叉编译吗?

[英]Should I cross-compile in Linux or Windows?

要使用Qt SDK在Linux中创建.exe ,我应该在Linux中交叉编译我的应用程序还是在Windows中交叉编译我的应用程序?

You need to cross compile on Linux, for windows. 对于 Windows,你需要 Linux上交叉编译。

EDIT: 编辑:

  1. install MinGW on Linux . Linux上安装MinGW。
  2. cross-compile your Qt code on Linux . Linux交叉编译你的Qt代码。 A windows binary ( .exe ) should be produced. 应该生成一个Windows二进制文件( .exe )。
  3. You are done. 你完成了。 Happily execute the exe on any windows system with Qt runtime libraries. 使用Qt运行时库在任何Windows系统上快乐地执行exe。

Hope that clears things up. 希望这能说明问题。

jrh JRH

可以在Linux中进行交叉编译 ,也可以在Windows中进行编译

First off, kvg. 首先,kvg。 Google search for "cross-compiling qt applications in linux for windows" and first link that comes up is this: http://silmor.de/29 Google搜索“在Linux for linux for windows中交叉编译qt应用程序”,首先出现的链接是: http//silmor.de/29

The steps should be simple: 步骤应该很简单:

  • install mingw 安装mingw
  • install qt linux binaries so that you get qmake and moc and other stuff needed for compilation. 安装qt linux二进制文件,这样你就可以得到qmake和moc以及编译所需的其他东西。
  • get windows qt binaries and other possible libraries your application requires. 获取windows qt二进制文件和应用程序所需的其他可能的库。
  • create a new qmake configuration files (see silmor.de page for more details) 创建一个新的qmake配置文件(有关详细信息,请参阅silmor.de页面)
  • go to your source folder and call qmake -spec $SpecFileCreatedInStep4 转到您的源文件夹并调用qmake -spec $ SpecFileCreatedInStep4
  • make 使
  • profit!! 利润!!
  • close your questions in so. 关闭你的问题。

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

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