在 Linux 上为 Mac OS X 编译 Qt 应用程序

发布于 2024-10-05 23:08:48 字数 204 浏览 0 评论 0原文

我正在开发一个 Qt 应用程序,我需要支持 Linux、Windows 和 Mac OS X。但唯一的问题是我没有 Mac。是否可以在 Linux 上编译适用于 Mac OS X 的应用程序并将其打包到 .dmg 文件中?

我还担心我的应用程序依赖于 OpenSSL,我可以在我的 Linux 机器上编译适用于 Mac OS X 的 OpenSSL 吗?

谢谢。

I'm developing a Qt application and I need to support Linux, Windows and Mac OS X. The only problem however is that I do not own a Mac. Is it possible to compile my application for Mac OS X on Linux and package it in a .dmg file?

I'm also worried with the fact that my application depends on OpenSSL, can I compile OpenSSL for Mac OS X on my Linux machine?

Thank you.

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

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

发布评论

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

评论(1

川水往事 2024-10-12 23:08:48

如果你连测试你的软件是否运行都无法,你还想如何支持 Mac?

OS X 的交叉编译:我怀疑是否有任何解决方案(如果有的话,我很想了解它),您需要整个 SDK 和工具链。
对于 .dmg 文件创建部分,这里还有另一个问题:

如何构建 dmg Mac OS X 文件(在非 Mac 平台上)?

应该不需要捆绑 openssl,因为它是每个 OS X 安装的一部分。

如果您想支持 Mac,您需要一台 Mac、一台(远程的、租用的等)或有人为您提供支持。我认为你没有其他选择。

中接受的答案

作为How to Compile for OS X Linux 还是 Windows?

建议,如果您开发免费软件,可以使用 Macports。它在用户的机器上进行编译(想想 FreeBSD ports 或 Gentoo 的emerge)。尽管如此,这仍然需要测试。

How do you want to support Mac if you can't even test if your software works?

Cross-compilation for OS X: I doubt there is any solution out there (I'd love to learn about it if it is), you'd need the whole SDK and toolchain for that.
For the .dmg file creation part, there is another question here:

How to build a dmg Mac OS X file (on a non-Mac platform)?

There should be no need to bundle openssl, as it's part of every OS X installation.

If you want to support Mac you need to Mac, access to one (remote, rented etc.), or someone who does it for you. I don't think you have another choice.

As the accepted answer in

How to Compile for OS X in Linux or Windows?

suggests, you can go for Macports in case you develop free software. It does the compiling on the user's machine (think FreeBSD ports or Gentoo's emerge). Still, that will require testing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文