Skip to main content

Requirements

Before installing syscalls-cpp, ensure your development environment meets these requirements:
  • MSVC: Visual Studio 2019 16.11 or later
  • Clang: Version 10 or later
  • GCC: Version 10 or later
  • Windows x86: 32-bit Windows targets
  • Windows x64: 64-bit Windows targets
Linux and macOS are not supported as syscalls-cpp is Windows-specific.
  • CMake: Version 3.15 or later (recommended)
  • MSBuild: Integrated with Visual Studio
The recommended method to install syscalls-cpp is through vcpkg, Microsoft’s C++ package manager.
1

Install vcpkg

If you haven’t already, clone and bootstrap vcpkg:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
2

Install syscalls-cpp

Run the following command to install the library:
vcpkg install syscalls-cpp
This will download, build, and install syscalls-cpp with automatic integration for MSBuild and CMake projects.
3

Integrate with your project

For CMake projects, use the vcpkg toolchain file:
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake
For MSBuild, vcpkg integrates automatically after running:
vcpkg integrate install

Conan

Alternatively, you can use Conan for package management.
1

Add dependency

Create or update your conanfile.txt:
conanfile.txt
[requires]
syscalls-cpp/1.2.0

[generators]
cmake
2

Install dependencies

Run Conan to install the package:
conan install . --build=missing
3

Configure CMake

In your CMakeLists.txt, include the Conan-generated files:
CMakeLists.txt
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

target_link_libraries(your_target ${CONAN_LIBS})

Manual Installation

For manual setup without a package manager:
1

Clone the repository

Clone the syscalls-cpp repository:
git clone https://github.com/sapdragon/syscalls-cpp.git
cd syscalls-cpp
2

Copy headers

Since syscalls-cpp is header-only, copy the include directory to your project:
# Copy to your project's include path
xcopy /E /I include\syscalls-cpp C:\your-project\include\syscalls-cpp
3

Configure include paths

Add the include directory to your compiler’s include path.For CMake:
CMakeLists.txt
target_include_directories(your_target PRIVATE
    "${CMAKE_SOURCE_DIR}/include"
)
For MSVC:
  • Project Properties → C/C++ → General → Additional Include Directories
  • Add the path to the include folder
4

Enable C++20

Ensure your project uses C++20 standard.CMake:
target_compile_features(your_target PRIVATE cxx_std_20)
MSVC:
  • Project Properties → C/C++ → Language → C++ Language Standard
  • Select “ISO C++20 Standard (/std:c++20)“

Verification

To verify your installation, create a simple test file:
test.cpp
#include <iostream>
#include <syscalls-cpp/syscall.hpp>

int main() {
    syscall::Manager<
        syscall::policies::allocator::section,
        syscall::policies::generator::direct
    > manager;
    
    if (manager.initialize()) {
        std::cout << "syscalls-cpp initialized successfully!" << std::endl;
        return 0;
    }
    
    std::cerr << "Initialization failed" << std::endl;
    return 1;
}
Compile and run this program. If it prints “syscalls-cpp initialized successfully!”, your installation is complete.

Platform Compatibility Notes

Some policies are platform-specific:
  • generator::gadget is only available on x64 Windows
  • The parser::directory policy uses different methods for x86 (sorted exports) vs x64 (exception directory)
For debugging purposes, you can disable compile-time hashing by defining SYSCALLS_NO_HASH:
  • MSVC: Add /DSYSCALLS_NO_HASH to compiler flags
  • GCC/Clang: Add -DSYSCALLS_NO_HASH to compiler flags

Next Steps

Quick Start

Follow our quick start guide to build your first syscall manager

Build docs developers (and LLMs) love