127

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?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
JohnMcG
  • 8,709
  • 6
  • 42
  • 49

9 Answers9

79

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.

Lidakis Manolis
  • 1,295
  • 2
  • 9
  • 11
Grant Limberg
  • 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
  • 6
    Xcode 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
  • 6
    I 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
  • 6
    Xcode'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
    Xcode is a C++ IDE just as much a notepad is. – nbubis Mar 14 '14 at 20:03
  • 5
    Xcode 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
    Xcode 9 added support for refactoring C++ (along with Swift). – Luke Rogers Feb 19 '18 at 17:30
  • 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
  • Clion is a good IDE,but it is not free. – Aaron Lee Nov 03 '22 at 02:39
15

Emacs! Eclipse might work too.

Terry G Lorber
  • 2,932
  • 2
  • 23
  • 33
7

Code::Blocks is cross-platform, using the wxWidgets library. It's the one I use.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Head Geek
  • 38,128
  • 22
  • 77
  • 87
5

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.

Michael Burr
  • 333,147
  • 50
  • 533
  • 760
4

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/

nkr1pt
  • 4,691
  • 5
  • 35
  • 55
4

Of​​​​​ course there is Mono.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
espenk
  • 575
  • 2
  • 8
  • 23
2

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!).

mipadi
  • 398,885
  • 90
  • 523
  • 479
1

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.

Community
  • 1
  • 1
Joel Hoff
  • 1,993
  • 20
  • 22
0

Xcode is free and good, which is lucky because it's pretty much the only option on the Mac.

idmean
  • 14,540
  • 9
  • 54
  • 83
Menkboy
  • 1,595
  • 10
  • 12