MacOS X CodeWarrior 9 Setup Guide
From WxWiki
Here is my experience with setting up CodeWarrior 9 under Mac OS X 10.3 (Panther). This was initially written on Sep 25, 2004, just before 2.5.3 release.
First, installing the compiler itself: the original CD as bought from Metrowerks contain only the 9.0 version, you need to download 9.3 update yourself from here. After installing it, you also need to rebuild all precompiled headers and library files if you're under 10.3 as they were built for 10.2. Locate the BuildLibraries.mcp file in Metrowerks CodeWarrior/MSL/(MSL_Build_Projects) (just who exactly thought that using brackets in paths was a great idea!?) and make it. I didn't have patience to wait until the end of recompilation of all Win32 projects (Win32, MFC, 3DNOW!, ...) and so I stopped the build after recompiling just the Mac part.
Second, before building wx itself, you need to build the following projects, all under <tt>src</tt>:
- <tt>zlib/zlibM8.xml</tt>
- <tt>regex/regexM8.xml</tt>
- <tt>tiff/tiffM8.xml</tt>
- <tt>jpeg/jpegM8.xml</tt>
- <tt>png/pngM8.xml</tt>
The procedure is always the same: go to <tt>File|Import...</tt> menu, choose the XML file, choose the name for new project (I used fooM9 which avoids clashes with the files in the cvs but does mean that you will have to remove all fooM8 occurences from wxWindows project itself and replace them with fooM9, so if you don't work much with cvs, you should probably use the same names for them), and make it. Here you have a choice between different configurations: static or shared, debug or release and PPC or Mach-O. You should know that PPC is the only which works on both Mac OS 9 and X, Mach-O is OS X only. Also note that wxMac is Carbon-only starting from 2.5.2, there is no Classic build currently (although it might be ressurected if someone really cares about this).
Third, you may now build wx itself. Import <tt>src/wxWindowsM8.xml</tt>, then modify the names of dependent libraries (under "wx-addon libraries") to "fooM9" instead of "fooM8", choose a configuration (e.g. "wxlib Carbon debug" pr "wxlib Mach-O debug") and make. With Mach-O config you might have problems with wrong runtime libraries as they've changed between CW8 and 9. To make long story short, you need MSL_C++_BSD_C_Mach-O.lib and BSD_Runtime_Mach-O.lib (or the same with "_D" appended for debug targets) instead of the .a files used by CW8 project.
Finally, you can now do the now familiar manipulation with <tt>samples/minimal/minimalM8.xml</tt> as well and build and run it.
