Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / MLNLFFIGen.adoc
CommitLineData
7f918cf1
CE
1MLNLFFIGen
2==========
3
4`mlnlffigen` generates a <:MLNLFFI:> binding from a collection of `.c`
5files. It is based on the <:CKitLibrary:>, which is primarily designed
6to handle standardized C and thus does not understand many (any?)
7compiler extensions; however, it attempts to recover from errors when
8seeing unrecognized definitions.
9
10In order to work around common gcc extensions, it may be useful to add
11`-cppopt` options to the command line; for example
12`-cppopt '-D__extension__'` may be occasionally useful. Fortunately,
13most portable libraries largely avoid the use of these types of
14extensions in header files.
15
16`mlnlffigen` will normally not generate bindings for `#included`
17files; see `-match` and `-allSU` if this is desirable.