2.10 Options for interoperability with other languages
- -fc-prototypes
-
This option will generate C prototypes from
BIND(C)variable declarations, types and procedure interfaces and writes them to standard output.ENUMis not yet supported.The generated prototypes may need inclusion of an appropriate header, such as
<stdint.h>or<stdlib.h>. For types which are not specified using the appropriate kind from theiso_c_bindingmodule, a warning is added as a comment to the code.For function pointers, a pointer to a function returning
intwithout an explicit argument list is generated.Example of use:
$ gfortran -fc-prototypes -fsyntax-only foo.f90 > foo.h
where the C code intended for interoperating with the Fortran code then uses
#include "foo.h".
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-8.4.0/gfortran/Interoperability-Options.html