My cross-platform template for SFML projects
I use Visual Studio Code with the following extensions:
- Clangd - C++ code completion & highlighting
- Clang-Format - Code formatting
- CMake Tools - CMake project support for VSCode
- cppcheck - tool for static code analysis
- SonarLint - check for code quality & security issues
After installing these extensions, simply clone this repository and open the folder in VSCode. CMake Tools should recognize the project.
Copy the compile_commands.json
file from build/
to the parent directory.
Now you can use the following commands:
CMake: Build
- to build the executable (do this first)CMake: Run Without Debugging
- to run the executable (shortcut Shift+F5)CMake: Debug
- to run the project with debugging (shortcut Ctrl+F5)
If all goes well, you should see the "game" in action.
Tested on:
- Windows 10 with MinGW, Clang & Visual Studio 2022
- MacOS with GCC & Clang