如何为 OS X Yosemite 安装 Eclipse for C++?

How to install Eclipse for C++ for OS X Yosemite?

我有一本 mac 书,我正在学习 C++。我无法练习它,因为我不知道如何让 eclipse 工作。有人可以告诉我在 mac 上安装 eclipse 的确切步骤吗(带注释的首选图片)。谢谢

下载Eclipse CDT, unzip it, then "double click" on the "Eclipse" icon in the unzipped folder. This should do it. If you want the debugger to work, that's a different story, you have to use g++ with gdb (Eclipse doesn't work with lldb), so you need to install g++ and gdb and code-sign the latter. Easiest way to install them is via macports.

PS:要使 Eclipse 正常工作,您需要一个 Java 虚拟机,请参阅 here 如何为 Yosemite 安装它。

顺便说一句:查看 JetBrains 的 CLion IDE,我觉得它非常好。或者,如果您想坚持使用 clang++,请使用 XCode。在这种情况下,唯一的缺点是 IDE(我对 XCode 不是很兴奋)和 clang++ 缺少 OpenMP(这对我来说非常重要)。您可以使 OpenMP 与 clang++ 一起工作,但这很痛苦。