×
Namespaces

Variants
Actions

How compile conditionally based on SDK

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: nigel.brown (06 Mar 2008)
Last edited: hamishwillee (30 May 2013)

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.

This page was last modified on 30 May 2013, at 07:33.
49 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×