适用于 OS X 的 C++ IDE

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2805895/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 11:08:12  来源:igfitidea点击:

C++ IDE for OS X

c++idemacos

提问by gprime

I am now starting to get back to C++ coding (just for fun), and would like an opinion on good IDEs for Mac.

我现在开始回到 C++ 编码(只是为了好玩),并希望对适用于 Mac 的优秀 IDE 发表意见。

I am currently using Xcodewhich seems kinda cool because it has everything built into it.

我目前正在使用Xcode它看起来有点酷,因为它内置了所有东西。

Do any of you have any other IDEs that you would suggest that O give a shot or should I just stick to Xcode?

你们有没有其他 IDE 建议 O 试一试,或者我应该坚持使用 Xcode?

采纳答案by FrustratedWithFormsDesigner

Eclipse and NetBeans are both capable of working with C++ and they will run on OSX (as well as other platforms). They're both free, and have large communities behind them. They can both do much more than C++ via plugin frameworks, if you want.

Eclipse 和 NetBeans 都能够使用 C++,并且可以在 OSX(以及其他平台)上运行。它们都是免费的,并且背后有庞大的社区。如果你愿意,它们都可以通过插件框架做比 C++ 多得多的事情。

Personally, I'd stick with Xcode - for C++ on OSX.

就个人而言,我会坚持使用 Xcode - 对于 OSX 上的 C++。

回答by wilhelmtell

You have a few options:

您有几个选择:

  • If you're the "full-blown IDE kind-of-person" then Xcode is the way to go. Xcode is to OS X what Visual Studio is to Windows.
  • If you're the "flee market" kind of person (like me!) then MacVimwith make (or any otherbuild tool) and other toolsis your thing. Of course, I heard there's also Emacs on OS X, if that's your sex-appeal, or TextMate. On the GUI text-editing scene on the Mac these are the dominating giants.
  • Then there's Qt Creator, which comes with the Qt SDK. Qt Creator is an IDE, yet it's very lightweight and quite simple at first-glance. It uses the Qt SDK so your code should be cross-platform among Windows, KDE, and OS X. It will run on other Linux windowing systems given Qt is installed, but I personally think these are the three platforms on which Qt applications integrate best.
  • 如果您是“成熟的 IDE 类型的人”,那么 Xcode 是您的最佳选择。Xcode 之于 OS X 就像 Visual Studio 之于 Windows。
  • 如果您是那种“逃离市场”的人(像我一样!),那么MacVim和 make(或任何其他构建工具)和其他工具就是您的选择。当然,我听说OS X上也有Emacs,如果那是你的性感,或者TextMate。在 Mac 上的 GUI 文本编辑场景中,这些是占主导地位的巨头。
  • 然后是Qt Creator,它随Qt SDK 一起提供。Qt Creator 是一个 IDE,但它非常轻巧且乍一看非常简单。它使用 Qt SDK,因此您的代码应该在 Windows、KDE ​​和 OS X 之间跨平台。如果安装了 Qt,它将在其他 Linux 窗口系统上运行,但我个人认为这是 Qt 应用程序集成最好的三个平台.

I have experience with all three of them. I personally love the editing feeling of MacVim most, by far. On the other hand, it's hard to compare with Xcode's debugging features. Xcode is also your only option if you develop for some specific Apple platforms and frameworks — the iPhone for example. And then, Qt Creator is an IDE with all the intellisense and debugging you expect from an IDE, yet it's simple, light and fast. Beyond that (and given the just-over 0.5GB cost) Qt also gives you that write-once-compile-"everywhere" feature, which is very nice.

我对他们三个都有经验。到目前为止,我个人最喜欢 MacVim 的编辑感觉。另一方面,很难与 Xcode 的调试功能进行比较。如果您为某些特定的 Apple 平台和框架(例如 iPhone)进行开发,Xcode 也是您唯一的选择。然后,Qt Creator 是一个 IDE,具有您期望从 IDE 获得的所有智能感知和调试功能,而且它简单、轻便且快速。除此之外(并考虑到刚刚超过 0.5GB 的成本)Qt 还为您提供了一次编写-编译-“无处不在”的功能,这非常好。

回答by Tristram Gr?bener

I like qtcreator http://qt.nokia.com/products/developer-toolsIt's quite simple but very efficient.

我喜欢 qtcreator http://qt.nokia.com/products/developer-tools它非常简单但非常有效。

Don't be affraid of the Qt name. You don't have to develop anything arround Qt if you use it.

不要害怕 Qt 的名字。如果你使用 Qt,你就不必在 Qt 周围开发任何东西。

回答by greyfade

If you're comfortable with Vim, then you can keep using it on the Mac: MacVim(The command-line version is also pre-installed.)

如果您对 Vim 感到满意,那么您可以继续在 Mac 上使用它:MacVim(命令行版本也已预装。)

Otherwise, I'd just stick with Xcode. It's the only environment Apple supports, and if you choose to develop for Apple platforms, some of them will restrict you to it.

否则,我只会坚持使用 Xcode。这是 Apple 支持的唯一环境,如果您选择为 Apple 平台开发,其中一些平台会限制您使用它。

回答by jonathanzh

As of year 2016 I have tried several free, well-known IDEs for C++ development on MAC OS X, mainly for learning/teaching/training purposes. Following are my choices in order of preference:

截至 2016 年,我已经尝试了几个免费的、知名的 IDE,用于在 MAC OS X 上进行 C++ 开发,主要用于学习/教学/培训目的。以下是我的选择,按偏好顺序排列:

  1. Qt Creator: To me this is the best IDE not only for Qt C++ development, but also for developing non-Qt C++ programs. Just choose “Qt Console Application” when setting up a project. The set-up is minimal for creating a first, “Hello World” C++ program. You may need to open an account with Qt, and choose to download the open source version for free. This option is not adequate for those who don't want to open an account with Qt.
  2. Eclipse IDE for C/C++ Developers: This IDE has a big user community and a long history. Since it is a generic IDE for programming languages other than C++, I find it less easy to use, especially when developing a first, “Hello World” C++ program. More set-up is needed, including the need to handle run configurations. However, this is my personal experience that may not apply to other users.
  3. Xcode: This used to be my first choice as it is part of MacOS Developer Tools that can be directly downloaded from Apple App Store. However, the most recent release does not support C++ development, or does not support it well. So I have downgraded it as my 3rd choice.
  1. Qt Creator:对我来说,这不仅是用于 Qt C++ 开发的最佳 IDE,也是用于开发非 Qt C++ 程序的最佳 IDE。设置项目时选择“Qt Console Application”即可。创建第一个“Hello World”C++ 程序的设置最少。您可能需要在 Qt 上开设一个帐户,并选择免费下载开源版本。对于那些不想在 Qt 上开立账户的人来说,这个选项是不够的。
  2. 面向 C/C++ 开发人员的 Eclipse IDE:该 IDE 拥有庞大的用户社区和悠久的历史。由于它是除 C++ 之外的其他编程语言的通用 IDE,我发现它不太容易使用,尤其是在开发第一个“Hello World”C++ 程序时。需要更多的设置,包括需要处理运行配置。但是,这是我的个人经验,可能不适用于其他用户。
  3. Xcode:这曾经是我的首选,因为它是 MacOS Developer Tools 的一部分,可以直接从 Apple App Store 下载。但是,最新版本不支持 C++ 开发,或者没有很好地支持它。所以我把它降级为我的第三个选择。

There are also many online IDEs for C++, mainly for learning purposes. However, these simple IDEs may not offer to save your code to your machine.

网上也有很多C++的IDE,主要是学习用的。但是,这些简单的 IDE 可能无法将您的代码保存到您的机器上。

回答by wgr

Have a try Visual Studio Code for MAC, I have used it for a while, feels better than Eclipse and Xcode, and it support multiple languages.

试试Visual Studio Code for MAC,用了一段时间了,感觉比Eclipse和Xcode好,支持多语言。

https://code.visualstudio.com/docs/languages/cpp

https://code.visualstudio.com/docs/languages/cpp

enter image description here

enter image description here

回答by Justin Ethier

You might consider using Eclipse C/C++ Development Tooling - CDT, which is a cross-platform IDE that will run on OSX.

您可能会考虑使用Eclipse C/C++ 开发工具 - CDT,这是一个将在 OSX 上运行的跨平台 IDE。

回答by Harry

TextEdit is the best way to go.
Also you can use rich-text to make your code look good.

TextEdit 是最好的方法。
您也可以使用富文本使您的代码看起来不错。