Authors: Dear Fortran Programmer,
I am using my CodeBlocks IDE with fortran projects but to create my source to work
with several compilers on large old projects i found that a lot of commands are missing on gfortran.
I have looked around and did not found and solution for this so i have tried to use
"c" pre compiler defines as a replacement for part of those commands.
How do i use this gfortran.pp file, instead of using gfortran compiler, i am using gcc but
the extension of those files must be known like .f .f90 or .f95
gcc @gfortran.pp prog1.f prog2.f90 prog3.f95 -lgfortran
This file defines the inline replacement for the following functions:
SIND,DSIND,ASIND,DASIND,COSD,DCOSD,ACOSD,DACOSD,IIDINT,IDINT,KIDINT,JMIN0,IIFIX
FLOATJ,KIABS,KISIGN,ATAN2D,DATAN2D,DTAND,DATAND,INT1,INT4
please be aware of the line -cpp that enable the c pre compiler for this trick
Best Regards,
Zimmerman Israel
My tricks are implemented also for CodeBlocks IDE just use gcc (Not gfortran)
as your compiler and put the gfortran.pp under codeblocks directory and
on the project declarations put under Build Options->Other Options
@$(CODEBLOCKS)\gfortran.pp
$(CODEBLOCKS) is a Codeblocks symbol of the codeblocks directory
and Build Options->Linker Settings put the gfortran as library to add
That's all
On Mingw/gcc compiler will try to look for gfortran.dll,gfortran.a,libgfortran.a etc...
By using this it will work on cross platform Windows & Linux