
The extension of the currently active file. The base name (without extension) of the currently active file.

The directory containing the currently active file (relative to the common top level path). The filename of the file opened in the currently active editor. The common top-level directory of the currently compiled project. $(PROJECT_DIR), $(PROJECTDIR), $(PROJECT_DIRECTORY) The name of the currently compiled project. The filename of the currently compiled project. $(PROJECT_FILENAME), $(PROJECT_FILE_NAME), $(PROJECT_FILE), $(PROJECTFILE) The variables listed here are built-in variables of CodeBlocks. Per-target definitions have precedence over per-project definitions. Variables which are neither global user variables nor built-in types, will be replaced with a value provided in the project file, or with an environment variable if the latter should fail. The names listed below are interpreted as built-in types. Variables starting with a single hash sign (#) are interpreted as global user variables (see Variable Expansion 3.7 for details). Variable names must consist of alphanumeric characters and are not case-sensitive. SyntaxĬodeBlocks treats the following functionally identical character sequences inside pre-build, post-build, or build steps as variables: CodeBlocks will ask for all path’s usually necessary.ģ.12.1 Custom Members Mini-Tutorial 3.1. This is a very easy way to ensure the ’other developer’ knows what to setup easily. In contrast to all others if you setup such a variables and share your project file with others that have *not* setup this GV CodeBlocks will ask the user to setup the variable.

These variables have a very special meaning. Global Variables are mainly used for creating CodeBlocks from the sources or developments of wxWidgets applications. By this method, the settings for a project can be further parametrised. Then set the compiler option -mcpu=$(MCU), and CodeBlocks will automatically replace the content. Here you can, for example define your derivative as a variable MCU and assign a corresponding value to it. Custom Variables are user-defined variables which can be specified in the build options of a project. For further information please refer to Variable Expansion 3.4. Command Macros This type of variables is used for controlling the build process. Builtin Variables are predefined in CodeBlocks, and can be accessed via their names (see Variable Expansion 3.2 for details). The settings for environment variables in CodeBlocks are made at ’Settings’ /’Environment’ /’Environment Variables’. This can be useful in cases where a defined environment is necessary for the creation of projects. They can modify system environment variables such as PATH. Envrionment Variable are set during the startup of CodeBlocks. Access to the CodeBlocks variables is achieved via $. These types serve the purpose of configuring the environment for creating a program, and at the same of improving the maintainability and portability.

Variable ExpansionĬodeBlocks differentiates between several types of variables.
