Ever Wondered What Macros are Defined for your Project?

Carbide.c++ Build ConfigurationA colleague of mine recently popped down at my desk, asking me if there was an easy way to find the macros defined for a Symbian project build configuration. Given that a macro can originate form different places, its not always a easy guess. Of course you can look at the usual suspects, like the HRH file for the platform (\epoc32\include\variant\Symbian_OS_*.hrh) and the MMP file itself for the MACRO directive, but it won’t give you the full list, since the Symbian tool chain will insert its own on top. So how do you get it? Enter Carbide.c++ build configurations.

The Carbide.c++ build configurations, accessed through main menu -> Project -> Properties -> Carbide.c++ -> Carbide Build Configurations actually has some interesting options:

  • The SIS Builder tab enables adding installer packages and specify various signing options
  • The Environment tab lists information like what environment variables are defined for your specific build and lets you modify/add custom variables
  • The Arguments tab lets you specify additional parameter passed to the command line build options
  • The ROM Builder tab can be used to specify a ROM build command line , if you are a device creator, pretty handy
  • Last but not least, the Paths and Symbols tab, which not only displays the project include/src paths, but also displays the all important Symbols list, which is the list of macros that are defined for the project. Neat, isn’t it?

I can think of at least two use cases for having a list of project specific macro at hand. The first one just to check, without writing any code whether a specific macro is defined for a project. The second one, just too see what macros are present under the hood.

Happy coding!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s