Mac OS X 和 Linux 兼容性的最佳编译语言

发布于 2024-08-06 13:11:30 字数 1431 浏览 5 评论 0原文

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

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

发布评论

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

评论(11

咆哮 2024-08-13 13:11:30

我会用 C 语言实现核心业务逻辑,并花时间为每个平台的代码编写本机 GUI 包装器——Objective-C /Cocoa 和 GTK/gnome 或其他平台。

I would implement the core business logic in C and take the time to write GUI wrappers native To each platform's code -- Objective-C /Cocoa and GTK/gnome or whatever.

北方的韩爷 2024-08-13 13:11:30

您想创建什么类型的软件?

最有可能的答案是C/C++。

What sort of software are you trying to create?

The most likely answer is C/C++.

苏辞 2024-08-13 13:11:30

我推荐 Objective-C,因为它具有可移植性和易用性。如果你想在 Linux 上运行,你就不能使用 Cocoa,但 Objective-C 是一种非常好的语言,它可以让你轻松地与常规 C 代码交互。

I would recommend Objective-C for portability and ease of use. You don't get to use Cocoa if you want to run on Linux, but Objective-C is a really nice language and it let's you easily interface with regular C code.

对风讲故事 2024-08-13 13:11:30

考虑使用Python。您可以使用 wxPython 编写在两个平台上都具有本机外观的应用程序。

Python 随 Max OS X 和 Ubuntu 桌面一起提供,您的应用程序可以打包为外观和行为类似于任一平台上的任何其他本机应用程序。

Consider using Python. You can write applications that are native in appearance on both platforms with wxPython.

Python comes with Max OS X and Ubuntu desktop and your application can be packaged to look and behave like any other native application on either platform.

信愁 2024-08-13 13:11:30

那么java呢?

如果您需要一些真正原生的东西,您可以随时使用 JNI

How about java?

And if you need some really native thing, you can always use JNI.

回忆凄美了谁 2024-08-13 13:11:30

怎么样 FreePascal 也许与 Lazarus 如果您对 GUI 开发感兴趣?

How about FreePascal maybe with Lazarus if you're interested in GUI development?

会傲 2024-08-13 13:11:30

假设您想创建一个具有图形用户界面的应用程序,我认为 C++/QT 是最有可能的候选者。我不知道有任何其他编译[1]语言在 OSX 和 Linux 上具有成熟的工具包支持。


  1. 通过“编译”,我假设您的意思是“生成本机可执行文件”。

Assuming that you want to create an application with a graphical user interface, I think that C++/QT is the most likely candidate. I'm not aware of any other compiled[1] language with mature toolkit support on OSX and Linux.


  1. By 'compiled' I'm making the assumption that you mean 'produces a native executable'.
浅唱ヾ落雨殇 2024-08-13 13:11:30

我会投票支持 ANSI C 或 C++ 加上 POSIX。

I would vote for ANSI C or C++ coupled with POSIX.

我做我的改变 2024-08-13 13:11:30

鉴于下面的其他答案,我认为你需要做出两个选择

1)如果你需要一个 GUI,则不需要选择 UI 库,要么是跨平台的 ee.g QT、wx 等,要么为 OSX 和 Linux 编写不同的库 - Apples首选方式,我认为让您在每个平台上获得最好的外观和感觉

2)您的应用程序是否需要快速计算,因为这可以驱动您的语言选择,例如 C++/C/Objective-C 与 python 这

两个选择是分开的,因为您可以混合大多数不同语言的 GUI 选择。

Given the other answers below I think you need to make two choices

1) If you need a GUI not you need to choose the UI library either a cross platform one ee.g QT, wx etc or write different ones for OSX and Linux - Apples preferred way and I think gettting you the best look and feel on each platform

2) whether your application needs fast calculations as that could drive your language choice e.g. C++/C/Objective-C vs python

The two choices are separate as you can mix most GUI choices with different languages.

铁憨憨 2024-08-13 13:11:30

我大胆猜测 C/C++ 将是最明显的平台无关语言。

(我真的不想)

为什么不呢?您计划开发什么类型的软件?

I would hazard a guess that C/C++ would be the most obvious platform independent languages.

(I would really rather not)

Why not? What sort of software do you plan on developing?

等待我真够勒 2024-08-13 13:11:30

这取决于你想做什么。如果您正在寻找非常高性能的应用程序,您的选择是 C/C++。如果您正在寻求快速开发,您的选择是 Java/Python。

It depends on what you want to do. If you are looking for very high performance application, your options are C/C++. If you are looking for quick development, your options are Java/Python.

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