Linux programming on a Mac

I recently picked up a Mac Mini and I'm looking to do some Linux C++ programming. How should I accomplish this? What are the options? (Forgive me but I know very, very little about Mac platforms.)

For example, setting up a VM sounds the most likely to suit my needs.

Are there command line tools for C++ on the Mac platform?
You could just install something like fink and develop under OS X. You will still need to install Xcode.

As for setting up a VM, it depends on what kind of box it is. Is it PPC or Intel?

I just use Fink. With Git installed, I just develop on whatever's to hand and push the work when I'm done.

You're probably doing something wrong if your non-GUI code doesn't work on FreeBSD/Darwin.
Last edited on
It all depends on what you are trying to do.

If you just want to program in c++ both Linux and OSX are a Unix based systems, and will allow you to write c++ code. Whatever you write using XCode or GCC on a Mac will still compile under Linux, as long as you don't start using OS specifix API calls. You don't need to go down the VM route.

I have both a Linux system and MacPro and also program professionally under Windows.

As I said it all depends on what you are intending to do? Will you be writing GUI programs or just programs to run in ther terminal?
Thanks for the responses. Both look interesting.

I just write terminal apps. It makes for good practice with algorithms, etc.. I develop professionally on POSIX-compatible systems and mess around at home in Ubuntu (or, I used to before getting a Mac).

What toolchain is bundled with XCode? (If it's GCC, my search will be over!)

I'm not particularly interested in an IDE, just getting my familiar terminal/toolchain available.

On a side note, can I get Vim installed too?
Last edited on
What toolchain is bundled with XCode?
It depends on the version. The current stuff uses clang.

Vi is already installed, ships with the OS. But with Fink, you can install almost anything else. Fink and Macports install into a single directory (/sw and /opt/macports respectively I think, I stopped using Macports), so they're easy to remove. MacOS doesn't have an uninstaller.
clang's cool, I've dabbled with that before. Thanks again!
All MacOSX releases provide gcc if Xcode is installed. Current gcc release used is 4.2.
Topic archived. No new replies allowed.