Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / localhost / MLNLFFIGen
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>MLNLFFIGen</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
9
10
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
13 /*<![CDATA[*/
14 asciidoc.install();
15 /*]]>*/
16 </script>
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
18 </head>
19 <body class="article">
20 <div id="banner">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
23 </div>
24 </div>
25 <div id="header">
26 <h1>MLNLFFIGen</h1>
27 </div>
28 <div id="content">
29 <div id="preamble">
30 <div class="sectionbody">
31 <div class="paragraph"><p><span class="monospaced">mlnlffigen</span> generates a <a href="MLNLFFI">MLNLFFI</a> binding from a collection of <span class="monospaced">.c</span>
32 files. It is based on the <a href="CKitLibrary">CKitLibrary</a>, which is primarily designed
33 to handle standardized C and thus does not understand many (any?)
34 compiler extensions; however, it attempts to recover from errors when
35 seeing unrecognized definitions.</p></div>
36 <div class="paragraph"><p>In order to work around common gcc extensions, it may be useful to add
37 <span class="monospaced">-cppopt</span> options to the command line; for example
38 <span class="monospaced">-cppopt '-D__extension__'</span> may be occasionally useful. Fortunately,
39 most portable libraries largely avoid the use of these types of
40 extensions in header files.</p></div>
41 <div class="paragraph"><p><span class="monospaced">mlnlffigen</span> will normally not generate bindings for <span class="monospaced">#included</span>
42 files; see <span class="monospaced">-match</span> and <span class="monospaced">-allSU</span> if this is desirable.</p></div>
43 </div>
44 </div>
45 </div>
46 <div id="footnotes"><hr></div>
47 <div id="footer">
48 <div id="footer-text">
49 </div>
50 <div id="footer-badges">
51 </div>
52 </div>
53 </body>
54 </html>