我可以在Mountain Lion上使用gcc 4.7(和C ++ 11)而无需安装XCode吗?

时间:2013-01-24 06:21:16

标签: c++ macos gcc macports

我一直在使用命令行工具和文本编辑器来编译类项目,这很有效。不幸的是,他们使用4.7成为关于我们的坚持者。 Xcode(以及因此OSX)只有llvm-gcc 4.2,所以我想升级。

我已经安装了macport并找到了安装gcc 4.7的说明,但它说我需要安装xcode。我希望能够只使用命令行工具而不是xcode(我不需要任何iOS或图形的东西,我只想要gcc。

无论如何,如果不可能,这没什么大不了的,但如果有人能指出我正确的方向,我会感激不尽。谢谢!

为了澄清,我有命令行工具,但不是我想要的gcc版本。运行macports会产生以下结果:

The-Black-Pearl:Desktop David$ sudo port install gcc47
Error: 
Error: No Xcode installation was found.
Error: Please install Xcode and/or run xcode-select to specify its location.
Error: 
Error: The installed version of Xcode (2.0orlower) is too old to use on the installed OS version. 
Version 4.1 or later is recommended on Mac OS X 10.8.

0 个答案:

没有答案