bartop

palmoswerks ARCHIVE
Palm OS programming tips from a (former) CodeWarrior insider

header

Navigation

Search
Home
About
Stories
Stuff I Like
Articles
PilRC
CodeWarrior
palmos.techwood.org
DevTools List
Palm OS Dev FAQ

More on Converting to Palm OS SDK 4.0 and Precompiled Headers

One area I left out in my previous article on this subject was prefix files. The Palm OS SDK 3.1 stationery files give you a default prefix file of "Us.Prefix.h". When you convert an older project to a newer SDK, this prefix doesn't exist anymore. You can go to the C/C++ Language panel and clear out this field, or you can replace it with "PalmOS_Headers", the new precompiled header name under 3.5 and later SDKs.

CodeWarrior's Ready-Made Precompiled Headers

If you've got CodeWarrior for Palm OS Platform V8, there is a BuildHeaders.mcp project which builds several styles of precompiled headers. This project is automatically linked to new projects created by the wizard. When its built, you'll have four precompiled headers:

  • PalmOS_Headers
  • PalmOS_Headers_Strict
  • PalmOS_Headers_Debug
  • PalmOS_Headers_Strict_Debug

The strict precompiled headers are built with a special DO_NOT_ALLOW_ACCESS_TO_INTERNALS_OF_STRUCTS macro that makes your code safer for future OS versions. The debug precompiled headers have ERROR_CHECK_LEVEL set to ERROR_CHECK_FULL, which enables full error checking in the Palm OS header files. These cover most of the cases you need, and using them can really reduce your compilation time.

brought to you by weblogger.com


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.

This is a Manila Site

qwertYAK / frobnovich