Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

A ".fcpp" extention

newguy
Beginner
409 Views
Hey, I ran across some code with the extension .fcpp. I have tried using the preprocessor by invoking the -fpp flag and other preprocessing flags but to didn't succeed.

Does anyone know how to compile with this type of file?your text here
0 Kudos
1 Reply
TimP
Honored Contributor III
409 Views
If this is a file which expects to be run through a C pre-processor, followed by running the Fortran compiler, the usual linux convention is a file suffix .F I don't think anyone could predict which C pre-processor functions it would require. The Intel compilers incorporate some of the usual linux/Unix functionality in this area, for files named .F, .F90, etc. possibly with the use of the -fpp options.

If you want the full pre-processing capability expected of g77, you may need to use g77 or gcc to pre-process the file, and pass the result to the Intel compiler. This might be done with a command such as
gcc -traditional -E -x c file.fcpp> temp.f

'g77 -E' is the same as gcc -E -traditional

Translation: use the old style cpp (don't process // as comment), and treat the file.fcpp as C source for that purpose. Put the pre-processed result in temp.f.

There are many pre-processors for Fortran, and they function alike only in the simplest cases, if at all. Considering that your source didn't use one of the most common conventions, it's impossible to guess all the details.

0 Kudos
Reply