|
|
![]() |
![]() |
|
|
|
SDL in CodeWarrior for Mac OS X Synopsis This section covers an approach to developing SDL Applications in Mac OS X using Metrowerks CodeWarrior v8. The foundation of the approach is a stationery distribution which is available for download. Quickstart Follow these quick steps to get SDL stationery in CodeWarrior:
Background I didn't think this was going to be so hard to do, so I was very surprised when at the end of the day, I *still* didn't have the most basic SDL code working in CodeWarrior v8 for Mac OS X (10.2.5). Here is what I learned from the experience:
Instructions To get SDL working with CodeWarrior (v8.3), follow these steps:
The 'SDL Stationery' directory contains all the files to start an SDL project in CodeWarrior v8.3 for Mac OS X. In principle, the directory can be installed in CodeWarrior's project stationery directory and it will be available for use in new projects. In practice, I can't get it to work. If someone figures out what is preventing CodeWarrior from accepting it as official stationery, please let me know! The files in the project are heavily based on the Project Builder stationery provided with the developers version of the SDL framework. I've done my best to limit changes to the files to necessities to make it work in CodeWarrior, so if further changes are made to the Project Builder stationery are made, I'll do my best to merge them into the files. As far as I know, the NIB code in SDLmain.m does not work in CodeWarrior, due to some language differences. I haven't tried it in Project Builder, but I assume it works. If someone figures out how to get it working in CodeWarrior, let me know and I'll merge in the changes. Debugging Debugging the SDL application requires that you manually copy the application's linked frameworks into a subfolder in the directory created when the debug target is built. For example, if the debug build creates SimpleHello.app, then copies of the SDL frameworks and any others you might be using need to be placed in SimpleHello.app/Contents/Frameworks/. If the Frameworks subdirectory does not exist, you will need to create it. If the frameworks are not copied into the required directory, when you go to debug the application, CodeWarrior will simply hang and you'll have to Force Quit the development environment. Metrowerks is aware of this bug and they promise it will be fixed in the next release. A similar problem happens in Project Builder, but in that environment, the debugger fails silently without crashing the rest of the IDE. Unlike CodeWarrior, Project Builder has the ability to copy the required frameworks automatically, so this is really no big deal. Useful Links |
||||
|
|
|
|||
|
©2003 Thomas Tongue. All rights reserved. |