Mac OS Lion上消失的Developer Tools

来源:互联网 发布:大数据清洁是什么意思 编辑:程序博客网 时间:2024/05/16 14:10



转自:http://www.scicoder.org/2012/03/developer-tools-on-os-x-10-7-lion/
Developer Tools on OS X 10.7 (Lion)

Developer Tools on OS X 10.7 (Lion)

Apple has made some big changes to their developer tools lately. The new Xcode 4 is a huge change from Xcode 3. I’ll admit that I’ve moved from “I hate it!!” to “I don’t hate it anymore.” But that took some time.

The other big change is that Xcode is now available only from the Mac App Store, of course for free. In previous versions when you installed the Developer Tools package, you'd get gcc, make, and all the usual developer tools you’d expect as part of the installation. Now “Developer Tools” means “the Xcode app.” If you install it and go to the command line, you might be a little surprised to still see this:

?
1
2
3
4
5
6
%make
-bash:make:commandnot found
% gcc
-bash: gcc: commandnot found
% cc
-bash: cc: commandnot found

You need to perform one more step. Open Xcode, and then go to Preferences ➔ Downloads and select the “Components” tab. There you can click the install button next to “Command Line Tools”.

Command Line Tools in Xcode

That’s it!

For those of you who miss the contents of the old /Developer directory read on. Its contents are not gone, but they now live inside the Xcode application itself. In the Finder, if you control-click (or right-click) on the Xcode icon and select “Show Package Contents”. But there are other ways to get to what you need; you don’t really need to go there. For example, to access the very handy File Merge tool, you get to it from the Xcode menu:

Developer Tools Menu

It’s rather annoying that Apple has “hidden” FileMerge like that, but hey, now you know where it is. What, you’ve never used it before?? It’s perfect for comparing two text files visually. Give a try — it’s a lot nicer than diff on the command line.

原创粉丝点击