User forums > Using Code::Blocks

Workspace Defines across projects?

(1/1)

BrianSidebotham:
Hi Guys,

I have a workspace which has about 10 projects in it, most of which are static libraries. Because these libraries are used in several different applications they require different configurations. At the moment I set the configuration with define values. For example, a couple of defines I use for one of the libraries:

AMB_CFG_USE_BIOMETRICS=1 (or 0)
AMB_CFG_USE_GFX_LCD=1 (or 0)

Is there a way that I can set compiler defines which will be present over the entire workspace? Otherwise every time I try to compile an application I have to setup the libraries defines in it's project before compiling the whole application.

If it is not possible, then I will have to create a target for each configuration I use, which will create a lot of different libraries!

Any other suggestions of how to achieve this are also welcome! :)

Best Regards,

Brian.

dmoore:
not workspace specific, but how about global variables? (settings menu) http://wiki.codeblocks.org/index.php?title=Global_compiler_variables

Navigation

[0] Message Index

Go to full version