Google Groups

Re: gfortran and preprocessor directives

Tim Prince Jan 30, 2014 3:47 AM
Posted in group: comp.lang.fortran
On 1/30/2014 5:39 AM, wrote:
> Il giorno giovedì 30 gennaio 2014 11:27:15 UTC+1, \"Vladimír Fuka <\"name.surname at ha scritto:
>>> the compiler signals these as "Illegal preprocessor directive". What am
>>> I doing wrong? Thank you.
>> Do you use the -cpp option?
> My version of gfortran does not recognize the -cpp flag....
Even on Windows, gfortran (mingw and cygwin) use the .F and .F90 file
suffixes to trigger tradcpp as -cpp does.
A usual way to pre-process explicitly is with a Makefile rule including e.g.
gcc -traditional-cpp -E $*.F > $*.f
where gcc -traditional-cpp has the same effect as gfortran -cpp.
If you went out of your way to find an unusual version of gfortran where
these features are stripped out, there's not much we can do for you.
Note that such versions are required by the GPL license to provide their
source code.

Tim Prince