Namespaces
Variants
Actions

How compile conditionally based on SDK

Jump to: navigation, search
Article Metadata

Article
Created: nigel.brown (06 Mar 2008)
Last edited: hamishwillee (23 Jul 2012)

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 23 July 2012, at 10:45.
123 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved