C/C++ installable feature
Optional Feature
This feature is not preinstalled in Kloud Workspace. Install it with the features system first.
The cpp feature brings a full compile, debug and build toolchain for C and C++ into the workspace.
Installation
Install the C/C++ toolchain using the features system:
sh
# Manual installation
ws-cli feature install cpp
# Or at boot time
docker run \
-e WS_FEATURES_ADDITIONAL_FEATURES="cpp" \
ghcr.io/kloudkit/workspace:v0.6.0Selecting a Compiler Version
By default the cpp feature installs gcc-14 and g++-14. Choose a different major with the version opt:
sh
# Manual installation
ws-cli feature install cpp --opt version=13
# Or at boot time
docker run \
-e WS_FEATURES_ADDITIONAL_FEATURES="cpp" \
-e WS_FEATURES_CPP_OPTS="version=13" \
ghcr.io/kloudkit/workspace:v0.6.0Supported versions are 13 and 14 (default).
⚠️ WARNING
With version=13, the unversioned gcc and g++ commands still resolve to gcc-14 (the Debian trixie default).
Invoke gcc-13 and g++-13 directly.
What's Included
The default gcc, g++ and make are already in the image (from build-essential). The cpp feature installs:
- cmake: Cross-platform build system generator, used for configuring C/C++ projects.
- gcc-14: The GNU C compiler (
gcc-13withversion=13). - g++-14: The GNU C++ compiler front-end (
g++-13withversion=13). - gdb: The GNU debugger for stepping through and inspecting running programs.
- gdbserver: Remote debugging server, useful for debugging programs running in separate processes or containers.
- make: Classic build automation tool that drives Makefile-based builds.
- ninja-build: A fast, minimal build system often used as a CMake backend.
VS Code Integration
The following extensions are installed automatically:
- CMake Tools (
ms-vscode.cmake-tools): Full CMake workflow integration. - Makefile Tools (
ms-vscode.makefile-tools): IntelliSense and build support for Makefile. - CMake (
twxs.cmake): CMake language support with syntax highlighting and auto-completion. - Native Debug (
webfreak.debug): GDB and LLDB debugger integration.