C.6. Command-Line Tools

C.6.1. DeRez


DeRez can produce a Rez file (.r) from a Carbon Resource Manager file or from a file's resource fork. It's often useful for examining the contents of a resource file or resource fork or for extracting existing resources for use in your own Rez files. Rez files have largely been replaced by nib files for Carbon user interfaces.

C.6.2. diff


diff displays differences between two text files. It is more configurable than the FileMerge application, although its results can be harder to interpret.

C.6.3. gcc


gcc is Mac OS X's built-in C/C++/Objective-C compiler. You can use gcc to build and link programs from the command line. Xcode uses gcc under the covers for compiling source code.

C.6.4. gdb


gdb is Mac OS X's built-in interactive source-level debugger. You can use gdb to step into your program's source or object code as the program runs. You can also use gdb to display the contents of core files (.core) that are saved in /cores when programs crash. Xcode uses gdb under the covers for its own interactive debugger.

C.6.5. GetFileInfo


GetFileInfo prints HFS metadata for specific files. You can use it to read a file's type or creator code, see if the file is invisible, and similar tasks. You can use the related tool SetFile to set this information.

C.6.6. ld


ld is Mac OS X's built-in object code linker. Normally, you might access ld's functionality ...

Get Beginning Mac OS® X Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.