SNAPHU 2.0.7 Windows x64 build for SNAP / SNAP13 users

snaphu-v2.0.7_win64_gcc15_msys2_patched.zip (1.4 MB)

Hello everyone,

I would like to share a small Windows x64 build of SNAPHU 2.0.7 that I prepared for use with SNAP / SNAP13:

snaphu-v2.0.7_win64_gcc15_msys2_patched.zip

I created this because, on my system, SNAP13 still downloaded and installed the older SNAPHU 2.0.4 Windows bundle, while the current upstream SNAPHU version is 2.0.7.

I am only a GIS enthusiast, not a professional C developer. My interest is mainly in GIS, Sentinel-1 processing, DEM generation, and terrain/elevation workflows. While trying to improve my DEM workflow, I needed SNAPHU and wanted to use the latest available version on Windows.

The build was made from the official SNAPHU 2.0.7 source code:

SNAPHU — Statistical-Cost, Network-Flow Algorithm for Phase Unwrapping
Author: Curtis W. Chen
Version 2.0.7, February 25, 2024

The Windows executable was compiled using:

  • Windows x64

  • MSYS2 MSYS environment

  • GCC 15.2.0

  • compiler path: C:/msys64/usr/bin/gcc.exe

A small compatibility patch was needed in src/snaphu_tile.c to make the source compile with GCC 15. The patch only updates two temporary function pointer declarations in GrowRegions() so that they are explicitly typed.

The package includes:

  • snaphu.exe

  • msys-2.0.dll

  • original config/

  • original man/

  • original README

  • original README_releasenotes.txt

  • README_WINDOWS_BUILD.txt

The executable was tested from both MSYS2 and normal Windows/PowerShell. It correctly reports:

snaphu v2.0.7

This is not an official SNAPHU release and it is not a new version number. It is simply an unofficial Windows convenience build of SNAPHU 2.0.7 for users who may want to use the newer version with SNAP/SNAP13.

I have also prepared a separate small patch package for the upstream SNAPHU author, so the GCC 15 compatibility change can be reviewed properly.

I want to add that this work was only possible thanks to the indispensable and very valuable help of ChatGPT 5.5, which guided me through the build process, the MSYS2/GCC configuration, the compilation errors, the runtime DLL check, and the final packaging.

I hope this can be useful to other Windows SNAP users who need SNAPHU 2.0.7.

Best regards.

2 Likes