我应该在 Linux 还是 Windows 中交叉编译?

发布于 2024-07-25 01:32:58 字数 94 浏览 4 评论 0原文

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

To create a .exe in Linux using Qt SDK, should I cross compile my application in Linux or cross-compile my application in Windows?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

噩梦成真你也成魔 2024-08-01 01:32:58

您需要在 Linux 上、Windows 上进行交叉编译。

编辑:

  1. Linux 上安装 MinGW。
  2. Linux交叉编译您的 Qt 代码。 应生成 Windows 二进制文件 (.exe)。
  3. 你完成了。 在任何带有 Qt 运行时库的 Windows 系统上愉快地执行 exe。

希望这能说明问题。

杰瑞赫

You need to cross compile on Linux, for windows.

EDIT:

  1. install MinGW on Linux.
  2. cross-compile your Qt code on Linux. A windows binary (.exe) should be produced.
  3. You are done. Happily execute the exe on any windows system with Qt runtime libraries.

Hope that clears things up.

jrh

街角卖回忆 2024-08-01 01:32:58

在 Linux 中交叉编译,或在 Windows 中编译

Either cross-compile in Linux, or compile in Windows.

£烟消云散 2024-08-01 01:32:58

首先,kvg。 Google 搜索“cross-compiling qt applications in linux for windows”,出现的第一个链接是: http://silmor.de/29

步骤应该很简单:

  • 安装 mingw
  • 安装 qt linux 二进制文件,这样你就可以获得 qmake 和 moc 以及编译所需的其他东西。
  • 获取windows qt 二进制文件以及您的应用程序需要的其他可能的库。
  • 创建一个新的 qmake 配置文件(有关更多详细信息,请参阅 silmor.de 页面)
  • 转到源文件夹并调用 qmake -spec $SpecFileCreatedInStep4
  • 获利
  • 结束你的问题。

First off, kvg. Google search for "cross-compiling qt applications in linux for windows" and first link that comes up is this: http://silmor.de/29

The steps should be simple:

  • install mingw
  • install qt linux binaries so that you get qmake and moc and other stuff needed for compilation.
  • get windows qt binaries and other possible libraries your application requires.
  • create a new qmake configuration files (see silmor.de page for more details)
  • go to your source folder and call qmake -spec $SpecFileCreatedInStep4
  • make
  • profit!!
  • close your questions in so.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文