The following build instructions are only needed if you would like to build DynAdjust yourself or make changes to the source code and contribute to the DynAdjust repository, rather than use pre-built binaries.
To build DynAdjust, the following prerequisites will be needed:
- A C++17 compiler (e.g. GCC, Clang, Microsoft Visual Studio C++)
- CMake
- Boost
- Apache Xerces
- Codesynthesis XSD
- BLAS and LAPACK, either OpenBLAS or Intel oneAPI Math Kernel Library
The way in which these prerequisites are installed will depend upon your operating system and will be discussed in the following sections.
For the case of Linux, we will give instructions on how to compile for Ubuntu. The appropriate package manager commands will vary depending on the Linux distribution that you use. We highly recommend trying the pre-built static binaries that we now generate that will work on any Linux distribution without any dependencies (assuming a x64 platform).
Update package lists.
sudo apt updateInstall runtime and development prerequisites.
sudo apt install -y libxerces-c-dev xsdcxx libboost-system-dev libboost-filesystem-dev libboost-timer-dev libboost-thread-dev libboost-program-options-devYou now have two options, either OpenBLAS or Intel oneAPI Math Kernel Library.
For OpenBLAS, just run:
sudo apt install -y libopenblas-dev liblapacke-devEither download and install yourself manually, or run:
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ac050ae7-da93-4108-823d-4334de3f4ee8/intel-oneapi-base-toolkit-2025.1.2.9_offline.sh -O oneapi.sh
sudo sh oneapi.sh -a --action install --components intel.oneapi.lin.mkl.devel --eula accept -sDownload an official release (e.g., 1.2.9) with:
curl -O https://github.com/GeoscienceAustralia/DynAdjust/archive/refs/tags/v1.2.9.tar.gz
tar xvf v1.2.9.tar.gz
cd ~/DynAdjust-1.2.9If you are using Intel MKL, then load it.
source /opt/intel/oneapi/setvars.shNow, compile the code with CMake.
mkdir build
cmake -S dynadjust -B build
cmake --build build --parallelBuilding DynAdjust on MacOS is just as easy as Linux.
Install Homebrew first if absent: visit https://brew.sh and run the one-line install script.
Run the following commands to install the prerequisites.
brew update
brew install boost xerces-c xsdDownload an official release (e.g., 1.2.9) with:
curl -O https://github.com/GeoscienceAustralia/DynAdjust/archive/refs/tags/v1.2.9.tar.gz
tar xvf v1.2.9.tar.gz
cd ~/DynAdjust-1.2.9If you are using Intel MKL, then load it.
source /opt/intel/oneapi/setvars.shNow compile the code with cmake.
mkdir build
cmake -S dynadjust -B build
cmake --build build --parallelMicrosoft's Visual Studio 2022 Community Edition is available from https://visualstudio.microsoft.com/vs/community/
C++ is required for compiling all DynAdjust binaries. During installation of Visual Studio, ensure C++ Desktop development and CMake tools for Windows components are installed. Dot NET is not used for any DynAdjust projects, however MFC is required for building GeoidInt.exe (Geoid Interpolation software), which has a (dialog-based) graphical user interface.
Full instructions for installing and using packages with CMake in Visual studio can be found here. Below is a brief summary of the steps.
On Windows, you will first need to install git.
If you do not have vcpkg installed, you can install it using the following steps.
git clone https://github.com/microsoft/vcpkg C:\vcpkg
C:\vcpkg\bootstrap-vcpkg.batAs per Microsoft's guidelines for setting up CMake projects to use vcpkg, DynAdjust has been configured to use the vcpkg toolchain file via the CMakePresets.json file. There is no need to manually change or configure the use of vcpkg.
Now we can install the dependencies.
vcpkg install boost-geometry boost-process boost-iostreams boost-spirit boost-system boost-filesystem boost-timer boost-thread boost-program-options boost-interprocess xerces-cDynAdjust requires Code Synthesis XSD to parse XML files. Since version 1.2.9, the CMake project file will automatically download XSD. Hence, there is no need to manually download and install it.
If you do not have it, download and install the Intel oneAPI Math Kernel Library {oneMKL). No extra configuration required because the installer registers MKL on the system PATH. Also, if Visual Studio 2022 is already installed, the Intel oneMKL installer will automatically enable integration into the Visual Studio 2022 IDE. This means that the oneAPI MKL libraries and headers will be automatically referenced upon compiling DynAdjust without modification.
Download and unzip an official release (e.g. 1.2.9) to C:\Data\Dev\ via the following command:
cd C:\Data\Dev
curl https://github.com/GeoscienceAustralia/DynAdjust/archive/refs/tags/v1.2.9.zip -o DynaDjust-1.2.9.zip
tar -xf DynAdjust-1.2.9.zipAlternativey, you can use git to get the latest version:
cd C:\Data\Dev
git clone https://github.com/GeoscienceAustralia/DynAdjust.git C:\Data\Devcd path\to\DynAdjust
mkdir build
cmake -G "Visual Studio 17 2022" -A x64 -D USE_MKL=ON -D CMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -S dynadjust -B build
cmake --build build --config Release --parallelUpon executing Visual Studio, select Open a local folder and navigate to the root folder where DynAdjust was extracted (above), where the top-most CMakeLists.txt file exists.
Upon opening this folder, Visual Studio will
-
Add CMake items to the Project menu, with commands for viewing and editing CMake scripts.
-
Display the folder structure and files in the Solution Explorer .
-
Run CMake and generate the CMake cache file (
CMakeCache.txt) for the default configuration. The CMake command line is displayed in the Output Window, along with other output from CMake. -
Start, in the background, to index the source files to enable IntelliSense, browsing information, refactoring, and so on. As you work, Visual Studio monitors changes in the editor and also on disk to keep its index in sync with the sources.
Once CMake cache generation has succeeded, you can also view your projects organized logically by targets. Choose the Select View button on the Solution Explorer toolbar. From the list in Solution Explorer - Views, select CMake Targets View and press Enter to open the targets view.
This will display all the DynAdjust executables and dependent dynamic link library (DLL) projects defined in the CMakeLists.txt file.
The project for each executable is named using the convention dna<program-name>wrapper, except for the main program dynadjust.
Upon compilation, these projects will create executables named <program-name>.exe. Each executable named <program-name>.exe is
dependent on a DLL named dna<program-name>.dll. The CMakeLists.txt file will ensure each dependency DLL is compiled first before compiling the executables.
The CMakePresets.json file manages four configurations:
- Debug version with MKL (
build-dbg-mkl) - Release version with MKL (
build-rel-mkl) - Debug version with OpenBLAS (
build-dbg-openblas) - Release version with OpenBLAS (
build-rel-openblas)
To build DynAdjust:
- Select the Build Configuration you would like to build (e.g.
build-rel-mkl) - From the Project Menu, select Delete Cache and Reconfigure
- Select Build All, or select the executable or DLL and then *Build


