我有一些 .h 文件用于 FORTRAN 77 中的某些模块(我自己没有编写)。我想在 Fortran 90 中编写一个新例程并使用这样的 .h 文件。我尝试使用include 'foo.h'
,当我尝试编译(使用 ifort 版本 13.0.0.079 Build 20120731)时,出现以下错误:
Syntax error, found IDENTIFIER 'FOO' when expecting one of: ( % [ : . = =>
C FOO COMMOM
我也尝试过使用include foo.h
,这给了我以下错误:
error #5082: Syntax error, found IDENTIFIER 'FOO' when expecting one of: <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
INCLUDE FOO.h
----------^
error #6274: This statement must not appear in the specification part of a module
INCLUDE foo.h
--^
error #6236: A specification statement cannot appear in the executable section.
!$ use omp_lib
---^
error #6236: A specification statement cannot appear in the executable section.
implicit none
--^
error #6456: This name must be a RECORD name. [FOO]
INCLUDE FOO.h
----------^
error #6460: This is not a field name that is defined in the encompassing structure. [H]
INCLUDE foo.h
-----------------^
error #6252: This format specifier is invalid. [FOO]
INCLUDE foo.h
我猜include
F90中不存在。是否有类似的东西允许使用 .h 文件?