I want to use a separate file where I define the macro to help compiling my source files.
The file is name “macro.h” (I tried with macro.f90) but the same error
!/* macro.f90 --- This file contains macro definition
! */
#ifndef INCLUDED_MACRO_H
#define INCLUDED_MACRO_H 1
#define FIXED_BOUNDARY 0
#define EULER_BOUNDARY 1
! use 1 all the time
#define _USE_LINEAR_FORM 1
! TUAN: only fixed-boundary is implemented
#define _BOUNDARY_CONDITION FIXED_BOUNDARY
! 0 = no CUDA/OpenGL
! 1 = use
#define _USE_DISPLAY_ 0
#endif
!/* INCLUDED_MACRO_H */
In the Fortran code, I use the INCLUDE statement
MODULE mycode
INCLUDE "macro.h"
CONTAINS
subroutine myfunc()
end subroutine
END MODULE
And when I try to compile the code, I get the following error
PGF90-S-0021-Label field of continuation line is not blank (./macro.f90: 4)
PGF90-S-0021-Label field of continuation line is not blank (./macro.f90: 6)
PGF90-S-0021-Label field of continuation line is not blank (./macro.f90: 8)
PGF90-S-0021-Label field of continuation line is not blank (./macro.f90: 9)
PGF90-S-0021-Label field of continuation line is not blank (./macro.f90: 12)
PGF90-S-0021-Label field of continuation line is not blank (./macro.f90: 15)
PGF90-S-0021-Label field of continuation line is not blank (./macro.f90: 20)
PGF90-S-0021-Label field of continuation line is not blank (./macro.f90: 23)
If I copy the whole file content and paste directly to the fortran source file, then there is no problem. I’m using Fortran 10.9, Ubuntu 64x.
NOTE: I already use -Mpreprocess in the compiler options.
Tuan