sudo apt install cmake
Install clangd.
compile_commands.json
will be created in build
directory. Symlink it (or simply copy it) to the root directory. To symlink it, cd
to the root and
ln -s build/compile_commands.json .
sudo apt install clang-format
Create build
and bin
directory in the root directory. Run build.sh
to configure build and build and execute tests and main program.
This project includes a configuration for launching and building C/C++ programs using Visual Studio Code. The configuration is defined in the launch.json
file and utilizes a prelaunch task in the launch.task
file.
-
Open this project in Visual Studio Code.
-
To run/debug specific programs within the project, set the
"program"
field inlaunch.json
to the name of the directory you want to run, e.g.,"program": "${workspaceFolder}/bin/03_select"
. Additionally, update the"args"
array entry to match the directory build, e.g.,"args": ["03_select"]
. -
Press F5 to build and launch your C/C++ program. The
launch.json
configuration handles the build and execution process.