Before building Sentinel-C, ensure you have:
-
CMake (version 3.10 or higher)
- Download: https://cmake.org/download/
-
C++ Compiler (C++17 support required)
- Windows: Visual Studio 2015+ OR MinGW
- Linux: GCC or Clang
- macOS: Xcode Command Line Tools
-
Git (optional, for cloning the repository)
Sentinel-C provides platform scripts in building-scripts/ with strict error handling.
Each script validates tools, runs configure + build, verifies the binary, and copies it
to bin-releases/<platform>/releases/bin/.
powershell -ExecutionPolicy Bypass -File .\building-scripts\build-windows.ps1 -Configuration Release -CleanOptional parameters:
-BuildDir build-windows-Configuration Release|Debug|RelWithDebInfo|MinSizeRel-Generator "Visual Studio 17 2022"(or another installed generator)-Clean
bash building-scripts/build-linux.sh --build-type Release --cleanOptional parameters:
--build-dir build-linux--build-type Release|Debug|RelWithDebInfo|MinSizeRel--generator "<cmake-generator>"--jobs <n>--clean
bash building-scripts/build-macos.sh --build-type Release --cleanOptional parameters:
--build-dir build-macos--build-type Release|Debug|RelWithDebInfo|MinSizeRel--generator "<cmake-generator>"--jobs <n>--clean
bash termux-support/build-termux.shOptional parameters:
--build-dir build-termux--build-type Release|Debug|RelWithDebInfo|MinSizeRel--jobs <n>--clean--yes(auto-approve missing package installs)--no-install(fail if required tools are missing)
-
Install Visual Studio 2022 with C++ development tools
-
Clone/extract the repository
-
Open PowerShell or Command Prompt
-
Navigate to the project directory:
cd Sentinel-C-main
-
Create and enter build directory:
mkdir build cd build
-
Generate Visual Studio project files:
cmake -G "Visual Studio 17 2022" ..
-
Build the project:
cmake --build . --config Release
-
The executable will be in:
build/bin/sentinel-c.exe
-
Install MinGW-w64 from https://www.mingw-w64.org/
-
Ensure
g++andmingw32-makeare in your PATH -
Clone/extract the repository
-
Navigate to project directory and create build folder:
mkdir build cd build
-
Configure with MinGW:
cmake -G "MinGW Makefiles" ..
-
Build:
cmake --build . -
The executable will be in:
build/bin/sentinel-c.exe
-
Install required build tools (Ubuntu/Debian):
sudo apt-get update sudo apt-get install build-essential cmake
-
Install for Fedora/RedHat:
sudo dnf install gcc-c++ cmake
-
Clone the repository:
git clone https://github.com/voltsparx/Sentinel-C.git cd Sentinel-C -
Create and enter build directory:
mkdir build cd build -
Generate build files:
cmake ..
-
Build the project:
cmake --build . -
The executable will be in:
build/bin/sentinel-c -
(Optional) Add to PATH:
sudo cp build/bin/sentinel-c /usr/local/bin/
-
Install Xcode Command Line Tools:
xcode-select --install
-
Install CMake (using Homebrew):
brew install cmake
-
Clone the repository:
git clone https://github.com/voltsparx/Sentinel-C.git cd Sentinel-C -
Create and enter build directory:
mkdir build cd build -
Generate build files:
cmake ..
-
Build the project:
cmake --build . -
The executable will be in:
build/bin/sentinel-c
After building, verify the executable works:
Windows:
./build/bin/sentinel-c.exe --helpLinux/macOS:
./build/bin/sentinel-c --helpExpected output:
Sentinel-C v4.5
--init <path> Initialize baseline
--scan <path> Scan and report changes (CLI/HTML/JSON/CSV)
--update <path> Scan and refresh baseline
--status <path> CI-friendly integrity status
--verify <path> Verification workflow (optional reports)
--watch <path> Continuous interval-based monitoring
--doctor Environment and storage diagnostics
--guard Security-focused hardening checks
--list-baseline List tracked baseline entries
--show-baseline <path> Show a specific baseline entry
--export-baseline <f> Export baseline to file
--import-baseline <f> Import baseline from file
--purge-reports Remove old report artifacts
--tail-log Tail Sentinel-C log output
--report-index List report artifacts (supports JSON output)
--prompt-mode Guided interactive console mode
--set-destination Save destination root for future runs
--show-destination Show active and saved destination settings
--version Show version metadata
--about Show trust-focused tool overview
--explain Explain major flags with examples
--help Show help
Output destination:
- Default runtime storage path is alongside the built binary (
<binary-dir>/sentinel-c-logs). - You can override per command using
--output-root <path>. - You can persist destination using
--set-destination <path>. - Logs/reports are written with timestamped meaningful filenames.
Cause: No C++ compiler detected on your system
Solution:
- Windows: Install Visual Studio 2022 or MinGW
- Linux: Run
sudo apt-get install build-essential - macOS: Run
xcode-select --install
Solution: Specify the compiler path explicitly:
cmake -D CMAKE_CXX_COMPILER=<path-to-compiler> ..Solution: Use MinGW generator instead:
cmake -G "MinGW Makefiles" ..You can customize the build by adding flags to cmake:
# Build in Debug mode (with debug symbols)
cmake -DCMAKE_BUILD_TYPE=Debug ..
# Build in Release mode (optimized)
cmake -DCMAKE_BUILD_TYPE=Release ..
# Specify custom C++ compiler
cmake -D CMAKE_CXX_COMPILER=clang++ ..To clean and rebuild:
cd build
rm -r * (Linux/macOS)
rmdir /s /q * (Windows)
cmake ..
cmake --build .# Initialize baseline for a directory
./sentinel-c --init /path/to/directory
# Scan for changes
./sentinel-c --scan /path/to/directory
# Run health diagnostics
./sentinel-c --doctor
# Use CI-friendly status check
./sentinel-c --status /path/to/directory
# View reports in sentinel-c-logs/reports/- The project uses C++17 standard
- Cross-platform compatible
- Requires at least 50MB of free disk space for build artifacts
- Reports are generated in
sentinel-c-logs/directory