next up previous contents FITSIO Home
Next: Using Macintosh PCs Up: Building the Fortran Library Previous: VMS Platforms

IBM Compatible PCs running DOS or Windows

This version of FITSIO currently requires a Fortran-90 compiler to build on an IBM PC running DOS or Windows. The previous 4.14 version of FITSIO may still be used with the older Fortran-77 compilers. In fact it is probably not difficult to port this new version FITSIO to run with most older compilers; anyone wishing to do so should contact the author for assistance.

To build the FITSIO library with a Fortran-90 compiler, one needs to compile all the subroutines in fitsio.f, fitsfort.f, and fitsf90.f. It usually results in smaller and more efficient code if each subroutine in these source files is split into a separate file before compiling, rather than compiling the entire large source file at once. A program called split.f is included with the fitsio distribution which will split the fitsio.f and fitsfort.f subroutines into separate files.

The exact commands to compile and build the library depend on the compiler, but the following example for the Microsoft PowerStation Fortran compiler illustrates the sequence of steps that are required:

        #  compile and link the split program:
        FL32 SPLIT.F

        #  run split to break the large sources files into
        #  many smaller files:
        SPLIT

        #  compile all the small files; write output to a log file:
        FL32 /C FT*.F, FITSF90.F >COMPILE.LOG

        # create the fitsio object library; write output to a log file
        LINK32 -LIB /OUT:FITSIO.LIB FT*.OBJ, FITSF90.OBJ >LINKER.LOG

The object module library, FITSIO.LIB, may then be used when linking any program that calls the FITSIO subroutines.


next up previous contents FITSIO Home
Next: Using Macintosh PCs Up: Building the Fortran Library Previous: VMS Platforms