This project provides a template and environment setup for developing C++ executable programs on Linux using CMake and Visual Studio Code. It is ideal for those who want a quick start with C++ development in a Linux environment, featuring ready-to-use configurations and minimal boilerplate.
- Pre-configured
.vscodesettings for seamless development in Visual Studio Code - Example
hello.cppsource file to demonstrate a simple C++ executable CMakeLists.txtfor CMake-based build automation- Linux executable output setup
- Organized structure for easy extension and scaling
- CMake (version 3.10 or higher recommended)
- g++ or any compatible C++ compiler
- Visual Studio Code
- CMake Tools Extension for VSCode
-
Clone this repository:
git clone https://github.com/JayTwoLab/vscode-cmake-cpp-linux-exe.git cd vscode-cmake-cpp-linux-exe -
Open the folder in Visual Studio Code.
-
Make sure all required extensions and tools are installed (see Prerequisites).
-
Use the VSCode command palette (Ctrl+Shift+P) to run:
CMake: Configureand thenCMake: Build. -
Run the executable as built in your configured output directory.
.vscode/- VSCode-specific settings for C++ and CMake integrationCMakeLists.txt- CMake build definitionhello.cpp- Example source file
This repository serves as a starting point for your own C++ executable projects. Feel free to modify hello.cpp and extend as needed for your application.
- MIT
- Maintained by JayTwoLab