Next: , Previous: Fcpp, Up: Implementation


30.4 WRAPGEN — The Wrapper Generator

The program, wrapgen, is used to generate the interfaces between Fortran and C. It is described in greater detail in the wrapgen manual page. Briefly, wrapgen takes a file of prototypes which describe functions written in either C or Fortran, and it generates procedures which can be called from the Fortran or C, respectively. The wrappers takes care of the machine dependencies inherent in character string representations, character string lengths, call by value or reference, and naming rules, so that the programmer need not be concerned about these details. All source code must include a wrapper header file generated by wrapgen in order to correctly handle the substitution of wrapper function names.