I have a collection of .F and .H files that make up the FORTRAN code. I am trying to compile .H files. .H files contain a bunch of common blocks. An example of one of the .H files:
*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 the .h files are c / C ++ files, but they are not like they are written in c / C ++. gfortran also seems to think these are C. files
When I try to compile:
gfortran-4.5 -fdefault-real-8 -fbacktrace -fno-align-commons HEAD.h
I get 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 on the first line of '* AC HEAD', but then the error was finding the attribute before *. I need something in the last column with HEAD # values to pass this, do I need to create .H files using the C ++ compiler or what?