using FITSIO in Octave-FITS under Cygwin

  1. Install Cygwin prereqs from Windows Command Prompt

     setup-x86_64 -P libcfitsio-devel make pkg-config gcc-g++ libgfortran3 libGraphicsMagick3 octave octave-devel texinfo
  2. From Cygwin, in Octave, type

     pkg install -verbose -forge fits

This should install FITS without errors. Type pkg load fits to enable the FITS functionality. Note, the command is NOT fitsread(), in Octave the FITS reading command is read_fits_image().

Tested with Octave 4.2, FITS 1.0.7

Reference: Manual cfitsio compile

This is not necessary, just for reference.


    tar -xvf cfitsio*.tar.gz

    cd cfitsio

    ./configure --prefix=/usr/local --enable-reentrant --enable-ssse3

    make && make install

    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

If you get an error message upon ./configure

gcc/g++ can’t be found

to fix, in Cygwin type

unset CC

then retry your ./configure command

Leave a Comment