Per-project variables

From Code::Blocks
Revision as of 02:46, 17 September 2011 by Alpha (talk | contribs) (Created page with "Category:User Documentation In addition to global variables, Code::Blocks supports usage of variables whose definition is stored within a projec...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

In addition to global variables, Code::Blocks supports usage of variables whose definition is stored within a project. To create a project variable, open Project->Build options...->Custom variables (tab). From the tree selection on the left-hand side, Code::Blocks offers the option of having the variable defined for the entire project, or per build target.

The center box contains a list of all currently defined project variables (this is often empty). Any variable defined here is accessible through $(variable). It is often useful to use project variables to manage filename pre/post-fixes, as it enables all occurrences to be changed simultaneously.

Note: all global variable constraints apply to per-project variables as well.