Building GTSAM on Windows is a bit more complicated than on linux. In the environments I have tried, the computation speed is slower on Windows than on linux. Also, depending on the build environment, the mex file may output unknown errors. For this reason, I cannot guarantee that gtsam_gnss will work on Windows.
- Windows 11, 64bit
- MATLAB 2024a
pip install pyparsing
- Download Boost pre-built binaries from here
- Version: 1.86.0, MSVC 14.3 (VS2022), 64 bit
- Install Boost to any directory
- Add the following path to the Windows environment variable
BOOST_ROOT
:path-to-install\boost_1_86_0
-
Clone or download gtsam-4.3a
- Due to the existence of build problems with the MATLAB wrapper, please use GTSAM from the above repository instead of the original GTSAM
-
Launch
x64 Native Tools Command Prompt for VS 2022
from the Windows start menu with administrative permissions.
cd path-to-install\gtsam-4.3a
cmake . -B build_windows -DGTSAM_BUILD_UNSTABLE=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DGTSAM_BUILD_TESTS=OFF -DGTSAM_INSTALL_MATLAB_TOOLBOX=ON -DGTSAM_WITH_TBB=OFF
cmake --build build_windows --config Release
cmake --install build_windows
- GTSAM and gtsam_toolbox is installed in
C:\Program Files (x86)\GTSAM
. Copy the DLL to the mex file (gtsam_wrapper.mexw64) directory.
copy "C:\Program Files (x86)\GTSAM\bin\*.dll" "C:\Program Files (x86)\GTSAM\gtsam_toolbox"
- Clone or download gtsam_gnss
- Launch
x64 Native Tools Command Prompt for VS 2022
from the Windows start menu with administrative permissions.
cd path-to-install\gtsam-gnss
cmake . -B build_windows
cmake --build build_windows --config Release
cmake --install build_windows
- gtsam_gnss is installed in
C:\Program Files (x86)\GTSAM\gtsam_toolbox
. - Add the above path to your MATLAB search path.