I have a collection of .F and .H files that makeup a FORTRAN code. I'm running into trouble tyring to compile the .H files. The .H files contain a bunch of common blocks. An example of one of the .H files is:
*AC HEAD
c HEAD 1
common/blah/ x(25), y, z(25), p(25,mnv), HEAD 2
1 t(25,mx), d(25,mnv) HEAD 3
c HEAD 4
ETC...
When I search for an answer on google, it is said that .h files are c/c++ files, but they don't look like they are written in c/c++. gfortran seems to also think they are C files.
When I try to compile:
gfortran-4.5 -fdefault-real-8 -fbacktrace -fno-align-commons HEAD.h
I get the errors:
cc1: warning: command line option "-fdefault-real-8" is valid for Fortran but not for C
cc1: warning: command line option "-fbacktrace" is valid for Fortran but not for C
cc1: warning: command line option "-fno-align-commons" is valid for Fortran but not for C
HEAD.h:1:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘HEAD’
I tried to comment out the first line '*AC HEAD', but then the error was about looking for an attribute before the *. Do I need something in the last column with the HEAD # values to commment that out, do I need to build the .H files with a C++ compiler or what?