Skip to main content

Building from source

Osiris can be compiled from source on both Windows and Linux platforms. The build process varies between platforms, so follow the instructions for your operating system.
Before proceeding, ensure you have installed all prerequisites.

Compiler requirements

Osiris is built with modern C++ and has specific compiler requirements:
  • C++ standard: C++20
  • Windows: Microsoft Visual Studio 2022 with MSVC compiler
  • Linux: g++ 11+ or clang++ 18+

Build configuration

The project uses CMake as its build system with the following configuration:
CMakeLists.txt
cmake_minimum_required(VERSION 3.24)
project(Osiris LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Building on Windows

Windows builds use Visual Studio’s native build system.
1

Open the solution

Navigate to the Osiris source directory and open Osiris.sln in Visual Studio 2022.
2

Set build configuration

In Visual Studio, set the build configuration to Release | x64:
  • Use the dropdown menus in the toolbar
  • Configuration: Release
  • Platform: x64
3

Build the solution

Press Ctrl+Shift+B or go to BuildBuild Solution in the menu.The build process will compile the source code and generate the DLL.
4

Locate the output

After a successful build, you will find Osiris.dll in the output directory:
x64/Release/Osiris.dll

Release build optimizations

The Windows release build includes several optimizations:
  • No C++ runtime library (CRT) dependency
  • No static imports
  • Stack protection disabled (/GS-)
  • Custom entry point (DllMain)
  • No default libraries linked
Source/CMakeLists.txt
target_compile_options(Osiris PRIVATE $<$<COMPILE_LANGUAGE:CXX>:/W4 $<$<CONFIG:Release>:/sdl- /GS->>)
target_link_options(Osiris PRIVATE $<$<CONFIG:Release>:/nodefaultlib /ENTRY:"DllMain">)
Only use the Release configuration for actual injection. Debug builds may have different behavior and larger file sizes.

Build artifacts

After a successful build, you will have:
  • Windows: Osiris.dll - Dynamic-link library for injection
  • Linux: libOsiris.so - Shared object library for injection
Both files are compiled as position-independent code with hidden symbol visibility for security.

Troubleshooting

Windows build errors

  • Missing workload: Ensure the “Desktop development with C++” workload is installed in Visual Studio 2022
  • Platform mismatch: Verify you selected x64 platform, not x86 or ARM64
  • SDK version: Update to the latest Windows 10/11 SDK if you encounter SDK-related errors

Linux build errors

  • CMake version: Verify you have CMake 3.24 or newer with cmake --version
  • Compiler version: Ensure g++ 11+ or clang++ 18+ is installed
  • Missing dependencies: Install development packages for your distribution

Next steps

Once you have successfully built Osiris, proceed to:

Build docs developers (and LLMs) love