I need to install node.js on my new Mac and it requires having c++ or g++ compiler installed. How do I get one without paying for xcode?
Just to be complete - Xcode 4.1.1 is free on the App Store but it requires Lion which implies a recent hardware purchase or paying for the upgrade.
Downloading and installing the massive Xcode installer is a huge hassle if you just want GCC and related tools.
The osx-gcc-installer allows you to install the essential compilers from either pre-built binary packages or helps you create your own installer.
You could get gcc for MacOSX from Apples Open Source site: http://opensource.apple.com/release/developer-tools-40/ It doesn't come with any instructions though.
(I think gcc is suitable, please feel free to correct me if I'm wrong).
XCode does NOT come with the latest GCC and G++ (it comes with 4.2), so you still need to do your own install if you want the latest features. Macports and GNU do NOT provide sufficient instructions. So, it remains a mystery.
You can download XCode or find it on your install CD. That will give you you the older GCC/G++. Once you have that, you can download the latest GCC.
US, Tampa: http://mirrors-us.seosue.com/gcc/
BUT, how do you install??
All I know is..
- Unzip the folder. It should be named gcc-4.6.3 OR gcc-4.7.3 etc.
- Create a new folder ADJACENT to the gcc-4.6.3 folder, called buidgcc (the buildgcc folder and gcc-4.6.3 folder live in the same place. Possibly in the folder Developer/usr )
- Open a terminal (Applications->Utilities->Terminal)
Navigate to the buildgcc folder that you created Terminal Commmands cd .. brings you UP 1 level(note space between cd and .. ) ls tells you what files & folders are in the folder you're in cd/foldername lets you navigate into a folder
If you're in the buildgcc folder, type: ../gcc-4.6.3/configure WAIT. Then type: make WAIT a very long time.
Sorry. Here is where I'm stuck.