Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programming C++ on OSX in Macbook pro

Tags:

c++

macos

I'm thinking of getting a new laptop. Is OSX C++ programmer friendly? I mainly use gedit, gdb, g++, meld, ddd (gdb front end), valgrind and RabbitVCS (svn) in Ubuntu. Does OSX have equivalent softwares.

like image 969
softwarematter Avatar asked Sep 05 '11 07:09

softwarematter


2 Answers

Yes, Mac OS X works well for many programmers. As for the specific software you mentioned:

  • You can get gedit for Mac OS X.
  • gdb is included with Xcode.
  • g++ is also included with Xcode.
  • It looks like Meld has a Fink package.
  • I was able to compile and run ddd successfully.
  • When I tried it quite a while ago, Valgrind did not work, but I think the issues have been fixed now (see Michael Anderson's comment).
  • RabbitVCS will work if you install a supported file manager. As far as I know, Finder is not supported.
like image 168
icktoofay Avatar answered Sep 19 '22 22:09

icktoofay


Mac OS X complies with the Single UNIX Specification and, consequently, is pretty programmer friendly. That said, some additional niceties on Linux that go above and beyond the spec may not be available on Mac OS X. Also, some Linux applications that rely on Gnome or KDE may not be available or might not work 100% on Mac OS X. As an example, GEdit is available for Mac OS X, but is extremely buggy.

That said, there are also many tools and utilities for programmers that are available on Mac OS X that are not available on Linux. For example, on Mac OS X, I use Xcode instead of GEdit, and Xcode is arguably far superior to GEdit as a code editor. Sadly, Mac OS X has no RabbitVCS equivalent.

You should have no problem with GCC, g++, etc. as those are all available through the Xcode package that is provided for free with Mac OS X. There is also a project called MacPorts, which brings many opensource packages that are available for Linux to Mac OS X. It provides an interface that is similar to apt-get (except it installs from source rather than from binaries) for installing those packages. I have Snow Leopard and have not had any trouble with MacPorts; however, be aware that the MacPorts page currently lists a number of packages that do not yet work in Lion, so some things might not work with a new MacBook until the port maintainers have patched their packages to work with Lion.

like image 29
Michael Aaron Safyan Avatar answered Sep 19 '22 22:09

Michael Aaron Safyan