The SWIG-GForth-Extension is an extension for SWIG, which generates interface-files for GForth out of c-headers.
This allows the programmer, to call c-functions from within GForth.

The SWIG-GForth-Extension provides 2 output formats:

FS and FSI files for the stdlibc as well as the source of the extension itself could be obtained in the download-section.
Alternatively it's also possible to use the online-version of swig, which is always the newest version.


In this mode, the SWIG-GForth-Extension generates a normal .fs file, which is ready to use in GForth without further modifications. All constants are resolved, enums and functions are transformed alike.

This mode is usefull for quick testing or for transforming already platform-dependent libraries.


After the implementation of the FS-mode was finished, it was thought of another format, which should be platform independent, this was the birth of the FSI-mode. The .fsi files are C-Source-Files which hold all constants and enums by name. When they are compiled, constants are resolved. When executed, the forth final forth-syntax will printed to stdout.