Using older SDKs with CW Palm 8
I had an interesting challenge on the newsgroup this morning. A user had a huge program built with Palm OS SDK version 3.1, and he didn't want to convert code, so he was trying to get the older SDK working with CW Palm 7. So, I took a few minutes and got a 3.0 SDK example working with 3.1 SDK in CW Palm 8. Here's how to make it work.
First, download the 3.1 SDK from Palm. They have it posted at http://www.palmos.com/dev/tech/tools/sdk31.html. You should unzip this into your CodeWarrior installation directory, giving you a "Palm OS 3.1 Support" folder.
The 3.1 page didn't have any examples, so I downloaded those from the 3.0 SDK page at http://www.palmos.com/dev/tech/tools/sdk30.html. The examples are designed to be extracted to "Palm OS 3.1 Support/Examples" to get the correct access paths.
The next hurdle is building the precompiled headers. You should find and open the PalmOSHeaders.mcp project. This project builds four precompiled header files, but the current CWPalm compilers
don't like the path syntax used on Windows. If you open each PCH file, you'll see a line like
#pragma precompile_target ":Obj:Pilot.h.mch"
Remove the ":Obj:" prefix from all of these lines, and you'll be able to build this project. You will notice that in the 3.5 SDK, they created a Windows and a Macintosh version of this file to solve this problem.
With this done, I then rebuilt the StartCode.mcp project, just to get a fresh copy of Palm's runtime library, then I tried to build the MineSweeper example. I had compiler problems here, because one of the lines of code used a Handle instead of a VoidHand. I also had to remove the StartupCode.lib file and re-add it to my project, since I couldn't get the IDE to find it in the current access paths, even after doing a re-search. With those fixes, everything compiled, and I had a new executable.

Send feedback to combee@techwood.org
Copyright © 2004 Benjamin L. Combee
Palm OS is a registered trademark of PalmSource, Inc.
Metrowerks and CodeWarrior are registered trademarks of Metrowerks Inc.
The views expressed on this website/weblog are those of mine alone and do not necessarily reflect the views of PalmSource or Metrowerks.

qwertYAK / frobnovich
|