Saturday, 14 November 2009

Getting Google's "go" language compiler set up on OSX (Snow Leopard)

Here are my rough notes for getting google's go compiler set up on Snow Leopard (applies to any 64 bit macbook). These steps are mostly outlined on, although there are a couple of extra steps I needed to make, which I'm listing here:

1. If you haven't already, install XCode so you have the gcc compiler:

2. Install mercurial (if you don't already have it):

3. Configure your environment variables and run the setup - open the terminal and in your home directory edit .profile and add the following:

Run source .profile if you want to use those values without restarting (otherwise just close the terminal and reopen it)

4. check out go from the mercurial repository

5. run the setup:

6. Write out the obligatory hello world code (hello.go):

7. Compile, link and run:

Adapted from:

No comments: