C.6. Command-Line Tools

C.6.1. DeRez

/Developer/Tools/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

/usr/bin/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

/usr/bin/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

/usr/bin/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

/Developer/Tools/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

/usr/bin/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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.