Next: Environment Variables, Previous: Code Gen Options, Up: Invoking GNU Fortran [Contents][Index]
This option will generate C prototypes from BIND(C)
variable
declarations, types and procedure interfaces and writes them to
standard output. ENUM
is 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 the iso_c_binding
module, a warning is added as a comment to the code.
For function pointers, a pointer to a function returning int
without 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"
.