In this document, you’ll learn how to build APFS SDK community edition, what issues you might encounter, and how to resolve them.

Build prerequisites

Before starting, ensure you have the following components up and running on your end-point:

  • C++ compiler
  • CMake
  • (Optional) OpenSSL library

Building Instructions

You can set up the APFS SDK on Linux, MacOS, or Windows. See below for the respective algorithms.  

For Linux/Mac OS

mkdir .build
cd .build
cmake ..
cmake --build .

For Windows

There are two ways to build apfsutil under Windows:

  1. Compile with MSVC from VS2015 or later.
  2. Download and install MinGW, add MinGW “bin” directory to the PATH system environment variable, and run cmake with “MinGW Makefiles” generator
mkdir .build
cd .build
cmake -G "MinGW Makefiles" ..
cmake --build .

If you have both MinGW “bin” and MSYS “bin” directories in PATH, use “MSYS Makefiles” generator instead.

Warning: option –trace is available only in the debug mode.

To build, use the following command:

cmake -DCMAKE_BUILD_TYPE=Debug ..

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.