SDL in CodeWarrior for Win32

Synopsis

This section covers an approach to developing SDL Applications in Win32 using Metrowerks CodeWarrior v8.2. The foundation of the approach is a stationery distribution which is available for download.

Quickstart

Follow these quick steps to get SDL stationery for Win32 in CodeWarrior:

  • Make sure your version of CodeWarrior is up to the latest version (v8.2 at the time of this writing).
  • Download the SDL Stationery for CodeWarrior for Windows.
  • Extract the archive into the appropriate Stationery directory, usually C:\Program Files\Metrowerks\CodeWarrior\Stationery\Win C\.

Background

The SDL Stationery that I have built has all of the headers, libraries and DLLs needed to develop and debug an SDL application for Windows. The Stationery contains a 'Debug' and a 'Release' directory which contain the libraries and DLLs needed to link and run debug and release versions of your SDL application. The Debug libraries have complete symbol information and no optimization, so they should be easy to work with in the debugger. The libraries in the 'Release' folder have no symbols and full optimization (for speed, not size).

In putting together this stationery, I had to decide what formats and libraries to include. For this initial release, I have included SDL, SDL_image and SDL_mixer, with support for JPEG and PNG images and WAV and Ogg Vorbis sounds and music. Other formats are available in the libraries if they're compiled in, but I have not bothered to add them for the sake of size and simplicity. Anyone interested in building one of the support libraries can see the Supporting Builds section below.

Supporting Builds

Below are a set of CodeWarrior projects archives which contain the CodeWarrior project file and any supporting files needed by the project to build the library. For each of the libraries, you will need to download and extract the original source from the respective sites, and then extract the CodeWarrior project archive into the top level directory of newly created library directory. This will create a CWProjects subdirectory which contains the project file for the library.

Library Original Source CodeWarrior Projects Archive
SDL www.libsdl.org SDL-CWProjects.zip (1.2 MB)
SDL_image www.libsdl.org SDL_image-CWProjects.zip (3.0 MB)
libogg www.xiph.org libogg-CWProjects.zip (8 KB)
libvorbis www.xiph.org libvorbis-CWProjects.zip (61 KB)
SDL_mixer www.libsdl.org SDL_mixer-CWProjects.zip (4.7 MB)

Useful Links