Re: fortran source file renamed when using preprocessor directives
- From: "Wade Ward" <zaxfuuq@xxxxxxxxxxx>
- Date: Tue, 30 Oct 2007 03:35:03 -0600
"Arjen Markus" <arjen.markus@xxxxxxxxxx> wrote in message
news:1193735892.964953.231140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This type of preprocessing uses the C preprocessor whichHow is the original post fortran as opposed to c?
does not "know" anything about Fortran. So there are
certain things (like macro expansion) that won't work
properly.
--
wade ward
President
Merrill Jensen Consulting
wade@xxxxxxxxxxx
435 -838-7760
g77 itself seems to handle preprocessing by:Writing c with g77? What could go wrong there?
- running the C preprocessor, thus generating a temporary
file in /tmp
- compiling this temporary file instead of the original
source code.
I do not think it has much choice there: due to preprocessing
the number of lines may change and the contents as well,
so that there is very little relation between the original
file and the preprocessed one.
One solution I can think of is, that you preprocess the files yourself
and keep the preprocessed source around:
cpp test.F pp/test.f
g77 -o test.o -c pp/test.f
(keep them in a separate directory to avoid confusion)
If all you need is to INCLUDE files, then there is no
need for this preprocessing. The Fortran compiler will
take care of it.
--
.
- References:
- Prev by Date: Re: fortran source file renamed when using preprocessor directives
- Next by Date: Re: detect Inf or NaN
- Previous by thread: Re: fortran source file renamed when using preprocessor directives
- Next by thread: Re: fortran source file renamed when using preprocessor directives
- Index(es):
Relevant Pages
|
|