Re: how do gfortran and ifort deal with C head files?
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Fri, 1 Feb 2008 22:35:50 -0800
<s1166@xxxxxxxx> wrote:
I have a fortran package which has many .h files which are 'include'd
by fortran sources. I cated those .h files, all are #define .
I can compile the package using g95,
g95 -cpp XXX.f90
or transfer it by
g95 -cpp -E XXX.f90 > YYY.f90
but how do gfortran and ifort deal with this?
Steve has answered your basic question, but allow me to note two things.
1. These are not "C header files" (as descibed in your subject line).
They use the C preprocessor, but the resulting code had better be
Fortran code rather than C or they aren't going to do anything useful in
the Fortran compiler in any case.
2. I recommend against mixing Fortran includes and C preprocessor
directives like this. It is just asking for portability problems. The
resulting problems probably count as a FAQ here.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- References:
- Prev by Date: Re: how do gfortran and ifort deal with C head files?
- Next by Date: Re: how do gfortran and ifort deal with C head files?
- Previous by thread: Re: how do gfortran and ifort deal with C head files?
- Next by thread: Fortran user models Intra-Day Stock Market
- Index(es):
Relevant Pages
|
|