I teach a C++ course using Visual Studio. One of my students has a Mac and was looking for an IDE to use on his machine. What would be good to recommend?
-
4[Clion IDE](https://www.jetbrains.com/clion/) Clion is the way to go. – George Cloone-y Aug 08 '15 at 08:52
-
To me eclipse c++ ide is the best ... i've even test Clion, I think eclipse is better than clion. – Rafaf Tahsin Sep 07 '16 at 11:35
-
Xcode is the best.. I dont find any editor bette than XCODE Even i have write assembly language code in XCODE – Akhzar Nazir Sep 08 '18 at 09:25
-
CodeLite is an alternative to Xcode. It is open-source and cross-platform. – Banghua Zhao Nov 02 '18 at 23:43
9 Answers
Xcode which is part of the MacOS Developer Tools is a great IDE. There's also NetBeans and Eclipse that can be configured to build and compile C++ projects.
Clion from JetBrains, also is available now, and uses Cmake as project model.

- 1,295
- 2
- 9
- 11

- 20,913
- 11
- 63
- 84
-
2(rhetorical) how can you beat Xcode as the answer to JohnMcG's question? you can't! Xcode is FREE (to mac owners), and while it simplifies and streamlines what gcc and gdb are doing for you, it **is** built on gnu, so you can easily "drop down a level" to straight gcc and gdb at any time! – pestophagous Oct 23 '08 at 15:57
-
6Xcode doesn't have refactoring support on OSX. Or at least it was disabled on my system.. so I use eclipse for now. – Nils Apr 24 '10 at 18:53
-
I also have to say that I like the fonts in Xcode much more, they look kinda wired in eclipse.. – Nils Apr 24 '10 at 19:01
-
6I never noticed a significant enough different in font rendering between Xcode and Eclipse. Xcode's layout, however, is weird. Especially if he was using Visual C++ to teach the class. Eclipse or Netbeans would be a much better option. – michael.bartnett Dec 06 '10 at 06:22
-
Xcode pwns NetBeans and Eclipse combined. And @que @que Xcode is not free, it costs $4.55. – Apr 02 '11 at 16:18
-
@WTP my XCode came bundled with the OS, are you talking about the XCode4? I think the free one is good-to-go for C++ – chunkyguy Sep 26 '11 at 21:58
-
XCode is very sluggish on my mac with SSD and 8GB RAM, I am really looking for some substitution for C++ projects. – pronebird Dec 13 '12 at 13:02
-
6Xcode's C++ autocompletion is lacking, it is slow and can't refactor C++. So maybe it's good as an IDE, but it's had as a text editor. – Zaky German May 01 '13 at 18:19
-
9
-
5Xcode is really a bad IDE, you can't even format the code. It's better TextEdit. – nbro Dec 23 '14 at 14:51
-
As much as I love Xcode for Objective-C, it is HORRIBLE for C++ development. You can't get even a distant similarity of Visual Studio's autocompletion, refactoring, jump-to-definition/declaration, method lookups and all those other features that speed up development radically. Xcode even looses syntax coloring from time to time and stops doing trivial code completion until restarted(!). I've been writing C++ code in OSX for few years already and my dev environment is spread between Sublime and Xcode. I haven't found a genuine OSX IDE (not Java-written like Eclipse or NetBeans) similar to VS. – peetonn Apr 14 '16 at 18:02
-
2
-
I would go for either code blocks or netbeans as they are open-source and cross platform. Eclipse has always been buggy, I do not recommend using it. – anilbey Mar 30 '18 at 20:24
-
I just wanted to warn people from Eclipse, it's quite glitchy on Big Sur and Catalina. It still works with older versions, though. – PugsAreCute Mar 12 '21 at 11:33
-
Emacs! Eclipse might work too.

- 2,932
- 2
- 23
- 33
-
1Yes. It feels like an Integrated Development Environment to me! – Terry G Lorber Sep 10 '16 at 03:19
-
35
-
emacs is an ide, an OS, an email/news reader and whatever else you want it to be. https://tuhdo.github.io/c-ide.html – olivecoder May 16 '19 at 12:59
Code::Blocks is cross-platform, using the wxWidgets library. It's the one I use.

- 30,738
- 21
- 105
- 131

- 38,128
- 22
- 77
- 87
-
24
-
3
-
1confirm. we use it in some labs, (I am a teacher) but stability, use and crash are simple NOT comparable. go Xcode. (it's free). – ingconti May 28 '17 at 10:12
Another (albeit non-free) option is to install VMware Fusion or Parallels Desktop on the Mac and run Windows with Visual Studio in a VM.
This works really pretty well. The downsides are:
- it'll cost money for the virtual machine software and Windows (the school may have some academic licensing that may help here)
- the Mac needs to be an x86 Mac with a fair bit of memory
The upside is that you and the student don't need to hassle with differences in the IDE that may not be accounted for in your instruction materials.

- 333,147
- 50
- 533
- 760
-
6Worth mentioning that with your method he will be building Windows binaries, and he _may_ want to build MacOS binaries instead. – Petruza Jan 18 '10 at 20:40
-
1
-
If you are looking for a full-fledged IDE like Visual Studio, I think Eclipse might be your best bet.
Eclipse is also highly extensible and configurable.
See here: http://www.eclipse.org/downloads/

- 4,691
- 5
- 35
- 55
It's not really an IDE per se, but I really like TextMate, and with the C++ bundle that ships with it, it can do a lot of the things you'd find in an IDE (without all the bloat!).

- 398,885
- 90
- 523
- 479
-
1
-
1@Pieter Not anymore. It is now GPL 3. http://blog.macromates.com/2012/textmate-2-at-github/ – Andre Soares May 09 '18 at 20:48
Avoid Eclipse for C/C++ development for now on Mac OS X v10.6 (Snow Leopard). There are serious problems which make debugging problematic or nearly impossible on it currently due to GDB incompatibility problems and the like. See: Trouble debugging C++ using Eclipse Galileo on Mac.