Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
How compile conditionally based on SDK
This tip explains how you can write SDK-conditional code
There are a number of macros for different SDKs, including __SERIES60_31__, __SERIES60_32__ etc. Unfortunately these aren’t available for all platforms and cannot be used in all file types (for example, mmp, bld.inf).
The solution is to define your own. Make a file called “blddef.h” and put whatever #defines in it you like and put it in epoc32\include. You can now include this in your source, mmp and bld.inf. Note, for the mmp and bld.inf, you need to use #include “blddef.h” and for the source files you need to use #include<blddef.h>
Then, you can just use #if defined(xxx) as normal.