What is the CBP file format?
A .cbp file is an XML project definition used by the Code::Blocks open-source IDE. It stores all information needed to build a project: source and header file lists, compiler selection, build target configurations (Debug, Release), preprocessor definitions, include paths, and linker flags.
The file begins with a standard <?xml declaration and uses <CodeBlocks_project_file> as its root element. Each source file is listed as a <Unit> element, optionally carrying per-file compiler overrides. Multiple build targets are defined within a <Build> section. The format version is tracked via major and minor attributes inside a <FileVersion> element; Code::Blocks upgrades older project files automatically on save.
A companion .layout file is stored alongside .cbp to record per-developer UI state - open editor tabs, cursor positions, and breakpoints. The .layout file should be excluded from version control; only .cbp should be committed.
Multiple projects can be grouped using a separate .workspace file. Code::Blocks can also import project files from Visual Studio (.vcxproj) and Dev-C++ (.dev), converting them to .cbp format.
Supported languages include C, C++, Fortran, and D (via plugins). Code::Blocks runs on Windows, Linux, and macOS, and the .cbp format is consistent across all platforms.
Security & safety
RISK: LOWPlain XML project file. Opening it in Code::Blocks does not execute any code; build targets may reference scripts that run at compile time, but the file itself is benign.
Format details
in a nutshell- CD Box Labeler Pro project file - Older labelling software used .cbp for its label-design project files; unrelated to Code::Blocks and very rarely encountered.
Programs that open CBP files
Technical details
deep spec| XML root element | <CodeBlocks_project_file> |
| Magic bytes | 3C 3F 78 6D 6C ("<?xml") at offset 0 |
| Encoding | UTF-8 |
| Format version tracking | <FileVersion major="N" minor="N"> element; auto-upgraded on open in newer Code::Blocks |
| Build targets | Debug / Release and custom targets defined under the <Build> element |
| Source file entries | <Unit filename="..."> elements with optional per-file <Option> compiler overrides |
| Companion file | .layout stores per-developer UI state (open tabs, cursor positions); should be git-ignored |
| Workspace grouping | .workspace file aggregates multiple .cbp projects |
| Import capability | Reads Visual Studio .vcxproj, Dev-C++ .dev, and other IDE project formats |
| Supported languages | C, C++, Fortran, D (via compiler plugins) |
| Platform | Windows, Linux, macOS (IDE and format are cross-platform) |
| Typical size | 2 KB - 50 KB |
| Compression | None - plain XML, human-readable |
| Released | 2005 (Code::Blocks 1.0) |
| Latest version | Code::Blocks 20.03 project file format (2020) |
| Specification | wiki.codeblocks.org |
CBP conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about CBP files.