FITSIO CMake build
From Cygwin, in Octave prompt:
pkg install -verbose cfitsioThis should build and install FITS from C source without errors.
Load the fits package by:
pkg load fitsThis enables Octave FITS read/write functions.
Building CFITSIO from source with CMake
Building CFITSIO manually is not necessary; this is just for reference:
curl -O https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio_latest.tar.gz
tar -xf cfitsio*.tar.gz
cmake -Bbuild
cmake --build build
ctest --test-dir build