Requirements:

C++ standard version >= C++ 17
Visual Studio version >= VS2022
GCC version >= 8.0
clang++ version >= 7.0

1 - Windows

On Windows, there are two ways to compile and run the example programs:

First method: Using an IDE
In the Windows environment, you can directly double-click examples.sln to open the project, then compile and run it.

Second method: Using CMake and nmake in Visual Studio 2022

1.1 Preparation

1.1.1 Install Visual Studio 2022 or a later version.
1.1.2 Set up the build environment
To compile a 64-bit program:
Start menu -> Visual Studio xxxx -> x64 Native Tools Command Prompt for VS
(xxxx is the version)
To compile a 32-bit program:
Start menu -> Visual Studio xxxx -> x86 Native Tools Command Prompt for VS
(xxxx is the version)
1.1.3 Navigate to the directory containing the CMakeLists.txt file in the example project.

1.2 Compilation
Run the following commands:
> mkdir build
> cd build
> cmake .. -G "NMake Makefiles"
> nmake

1.3 Running
Directly run the generated executable:
> .\examples.exe

2 - Linux

2.1 Preparation
On most Linux distributions (Ubuntu/Debian), you need to install the build tools and CMake:
$ sudo apt update
$ sudo apt install build-essential cmake g++

Other distributions:
CentOS/Fedora:
$ sudo dnf install gcc-c++ cmake make

Arch:
$ sudo pacman -S base-devel cmake

2.2 Compilation
Navigate to the directory containing the CMakeLists.txt file in the example project, run:
$ mkdir build
$ cd build
$ cmake ..
$ make

2.3 Running
Directly run the generated executable:
$ ./examples

3 - macOS

3.1 Preparation
macOS comes with Clang by default, so installing G++ is usually not necessary.

3.2 Compilation
Navigate to the directory containing the CMakeLists.txt file in the example project,
Run the following commands in the terminal:
% mkdir build
% cd build
% cmake .. 
% make

3.3 Running
Directly run the generated executable:
% ./examples
