Metrowerks CodeWarrior has been the predominant platform for C and C++ coding on the Macintosh platform since it displaced THINK C during the PowerPC transition in 1994. As a Mac OS X-native compiler, it remains the only sensible tool for Carbon development and represents Metrowerks’ first steps toward pure (Cocoa) Mac OS X development.
The traditional CodeWarrior IDE (Integrated Development Environment) is alive and well, and it remains one of the best code-browsing environments in existence. The IDE still features an almost absurd range of stationery (supporting dozens of project types, from standard C programs through Java applets), three languages (C, C++, and Java), and a variety of output types (such as PEF, MACH-O, and x86 Windows).
Some of CodeWarrior’s traditional annoyances are also alive and well. Error reporting is still technically correct but generally repetitious—a single typo in a header file, for example, can create hundreds of error reports in a complex project. An option to suppress repeated errors from the same file would make it considerably easier to focus on distinct errors without recompiling each time. The CodeWarrior IDE also misses some obvious chances to take advantage of Mac OS X’s Unix layer—standard flex and bison plug-ins, for example, would have made code exchange much easier.
The command-line compiler is potentially a welcome addition, as it opens up the possibility of using traditional Unix-style workflows and tools (make, flex, bison, and so on) with the CodeWarrior compiler. However, integrating this compiler into existing Unix makefiles is slightly maddening, due to some highly nonstandard behaviors (see “mwccppc, mwldppc, make, and madness,” below).
As of version 7, CodeWarrior tools don’t support Cocoa; in turn, Cocoa doesn’t support C++, so you must develop in either Objective C or Java. CodeWarrior doesn’t sport an Objective C compiler, and the Java compiler targets traditional Java development—you can build applets, but not Cocoa applications.
In general, the CodeWarrior compiler generates somewhat tighter code than GCC (GNU Compiler Collection; GCC 2.95.2 comes with the Mac OS X 10.1 Developer Tools). In our tests using the Bytemark benchmark, the CodeWarrior tools produced consistently quicker code than GCC did—and yes, we tumed on all optimizations in each compiler to avoid the common Bytemark flaw of compiler-specific optimizations.
Sammis, Ian. (February 2002). CodeWarrior Pro 7. MacAddict. (pg. 47).