Procedure for Windows system

Notes on Visual Studio

The more standard approach to develop C++ code on Windows is the use of Microsoft Visual Studio.
Note:

System setup for Visual Studio

assets/00_visual_studio_c++.jpg

Compile and execute the code

Generating a Visual Studio project

The first step is to generate a Visual Studio project from the CMake tool.

Setting up Visual Studio configuration

assets/01_visual_project.jpg

Example of project loaded in Visual Studio. Left: the "Solution Explorer" allowing to naviguate through the project files. Middle: the code of the selected file.

Now the default setup need to be adapted to be able to compile and run the code from within Visual Studio along the following steps.

1. In the solution explorer

assets/02_pgm_build.jpg

2. In the top toolbar

assets/03_RelWithDebInfo.jpg
assets/04_local_windows_debugger.jpg assets/05_output_directory.jpg
assets/06_debugging.jpg

Compiling and runing the executable