Before you begin, please select your operating system below.
We strongly recommend using the installer from the tutorial unless you are familiar with CMake and the build tools of your platform.
Use your distributions package manager to install GCC and CMake.
11 or higher.3.22 or higher.Verify the installed versions in your terminal:
Use the homebrew package manager to install clang (llvm) and CMake.
14.0.0 or higher.3.19 or higher.Verify the installed versions in your terminal:
Ensure that you have Microsoft Visual Studio installed. Install CMake. When installing CMake please ensure that you select the "Add to system path" option.
2022 or later.3.15 or higher.Verify the installed versions in your command prompt:
cmake --version
# example output:
# cmake version 3.15.0
# CMake suite maintained and supported by Kitware (kitware.com/cmake).
Download the Zaber Motion Library (ZML) source package. Please note that the source package contains prebuilt Go shared library required by ZML. If you decide to checkout the source code from the Git repository, you will need to install the Go toolchain build the shared library yourself.
Then open a command prompt and enter in the following commands.
You will need to specify the system architecture when calling cmake, for most systems this is 64bit (x64).
Note that if you wish to install the library (last step below) this command prompt must be started with admininstrator privileges.
# In the same directory as your unzipped source directory
# This path will change depending on the version of Visual Studio you have installed
call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsMSBuildCmd.bat"
cd ZaberMotionCppSource/cpp
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 ../ -DZML_ARCH=x64
msbuild "Zaber Motion Library.sln" /p:Configuration=Release
devenv "Zaber Motion Library.sln" /build Release /project INSTALL # Will require administrator privileges
The install step will place the libraries in C:\Program Files\Zaber Motion Library\.
For PowerShell, the commands are the same expect initializing the Visual Studio environment.
# This path will change depending on the version of Visual Studio you have installed
& 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1'
While it is possible to build the library using MinGW compiler, we do not support this use case. Please take the following instructions without any warranty.
In order to build the library the MinGW distribution must support dynamic linking (-ldl).
This is true of w64devkit but not of some other distributions.
You may need to install some additional packages.
Use the following commands to generate and build the project.
cmake -G "MinGW Makefiles" ../ -DZML_ARCH=x64
make
You may need to change some of the source/generated files to achieve a working configuration.
Then use CMake to build and install the source in your terminal.
You will need to specify the system architecture when calling cmake, for most systems this is 64bit (x64).