Preciso instalar o Node.js no meu novo Mac e requer ter c ++ ou g ++ compilador instalado. Como faço para obter um sem pagar pelo Xcode?
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?
You can still download Xcode 3.x for free with a free developer account. Xcode 3 comes with the GCC 4.2, LLVM-GCC 1.5 and LLVM 1.5 so everything you need to compile C++, C and ObjC code.
(Remark: LLVM 1.5 can't compile C++ code, so you have to switch back to LLVM-GCC or GCC for this.)
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.
First mentioned here by Dancek
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).
The Mac comes with software DVDs--one of those has Xcode. You can install it from there.
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..
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.