Prerequisites
Before building the project, ensure you have the following installed:- C++ compiler with C++20 support (the project uses
stdcpp20) - vcpkg package manager for dependency management
- Visual Studio 2019 or later (Platform Toolset v143 or higher recommended)
- Git for cloning the repository
- Windows 10 SDK (specified in the project configuration)
The project is configured for Windows using Visual Studio, with support for both x86 and x64 platforms.
Build Process
Install vcpkg (if not already installed)
If you don’t have vcpkg installed, follow these instructions:
The project uses vcpkg manifest mode (
vcpkg.json), so dependencies are managed automatically.Install dependencies
The project uses vcpkg manifest mode, which automatically installs dependencies when you build. However, you can manually install SFML if needed:The
vcpkg.json file specifies SFML version 2.6.2 as the only dependency.Build with Visual Studio
Open the solution file and build:In Visual Studio:
- Select your desired configuration (Debug or Release)
- Select your platform (x86 or x64)
- Build the solution (F7 or Build → Build Solution)
x64/Debug/SortingAlgos.exe(Debug x64)x64/Release/SortingAlgos.exe(Release x64)Debug/SortingAlgos.exe(Debug x86)Release/SortingAlgos.exe(Release x86)
Visual Studio Build Configuration
The project includes the following build configurations:Debug Configuration
- Warning Level: Level3
- SDL Check: Enabled
- Language Standard: C++20 (for x64)
- Debug Information: Full
- Subsystem: Console
Release Configuration
- Warning Level: Level3
- Optimization: Function-level linking and intrinsic functions enabled
- Language Standard: C++20 (for x64)
- Whole Program Optimization: Enabled
- Subsystem: Console (with Windows entry point via pragma comment)
Alternative Build Methods
Command Line Build with MSBuild
You can also build the project from the command line using MSBuild:CMake (Not currently supported)
The project currently uses Visual Studio project files (.vcxproj). A CMake build system is not yet implemented.
If you’re interested in adding CMake support to make the project cross-platform, consider contributing! See the Contributing guide.
Troubleshooting
SFML Not Found Errors
If you encounter errors like “Cannot open include file: ‘SFML/Graphics.hpp’”:Check manifest mode
Verify that
VcpkgEnableManifest is set to true in the project file (it should be by default).Linker Errors
If you encounter linker errors like “unresolved external symbol” related to SFML:vcpkg Configuration Issues
If vcpkg is not finding dependencies:-
Check the vcpkg-configuration.json: The project uses a specific vcpkg baseline. Ensure your vcpkg installation is up to date:
-
Verify the baseline: The project uses baseline
b1b19307e2d2ec1eefbdb7ea069de7d4bcd31f01from the Microsoft vcpkg repository. -
Reset vcpkg cache: If dependencies are corrupted:
Missing Assets
If the application fails to load fonts at runtime: The application expects:assets/Roboto-Regular.ttf- The font file for UI textassets/Algo.png- Application icon
Platform Toolset Version
If you see errors about platform toolset v145 not being found:- Open the project properties
- Go to Configuration Properties → General
- Change “Platform Toolset” to your installed version (e.g., v143 for VS 2022)
- Save and rebuild
Running the Application
After building successfully, run the executable:The delay parameter controls the wait time between each comparison operation, allowing you to slow down or speed up the visualization.