The BLOCKS SDK
The standalone BLOCKS SDK

The standalone BLOCKS SDK can be obtained from the BLOCKS-SDK repository.

The most straightforward way to use the SDK is to compile the SDK source code into a static library. Then, in your BLOCKS application code, you can use the header files in the SDK to give you access to the BLOCKS classes and functions. Finally, when you want to compile your application, you must link against the static library to get all the BLOCKS functionality.

Building the SDK library

The source code for the BLOCKS SDK library is contained within the SDK directory of the BLOCKS-SDK repository. Here you will find header files that you can include in your own projects and the Build subdirectory contains an Xcode project, a Visual Studio project and a Linux Makefile for compiling the SDK source code into a static library. Use the appropriate choice for your platform, select either the "Debug" or "Release" configuration, and build the project.

For macOS this will produce libBLOCKS-SDK.a in either the SDK/Build/MacOS/Debug/ or SDK/Build/MacOS/Release/ directory, for Linux this will produce libBLOCKS-SDK.a in either the SDK/Build/Linux/Debug/ or SDK/Build/Linux/Release/ directory, and for Windows this will produce BLOCKS-SDK.lib in either the SDK\Build\Windows\x64\Debug or SDK\Build\Windows\x64\Release folder.

Using the SDK header file

To use BLOCKS classes and functions in your application you must include the BlocksHeader.h file in your source code. You also need to tell the compiler to look in the SDK directory for additional header files, which you can configure inside your Xcode or Visual Studio project. If you are using the command line to compile your application then you can see an example of how to do this in examples/BlockFinder/Linux/Makefile or examples/BlockFinder/MacOS/Makefile.

Linking against the SDK library

You must also tell your compiler where to find the SDK static library before your BLOCKS application will compile, and include all of the dependencies for your platform, which are listed in the Standalone SDK dependencies section. Again, this is configured in your Xcode or Visual Studio project, but if you are using the command line you can see an example of how to do this in examples/BlockFinder/Linux/Makefile or examples/BlockFinder/MacOS/Makefile.

You can find example code of how to integrate the BLOCKS SDK into existing applications in the Example BLOCKS Integrations section.

Standalone SDK dependencies

  • A C++11 compatible compiler

macOS frameworks

  • Accelerate
  • AudioToolbox
  • CoreAudio
  • CoreMIDI

Linux packages

  • x11
  • alsa
  • libcurl