on master help sign in
Merge pull request #4632 from bigos/patch-1
03d9188Niklas Larsson
docs/reference/ffi.rst+18
@@ -115,6 +115,24 @@ For C, this is:
115 FFI_C : FFI
115 FFI_C : FFI
116 FFI_C = MkFFI C_Types String String
116 FFI_C = MkFFI C_Types String String
117
117
118+Linking foreign code
119+====================
120+
121+This is the example of linking C code.
122+
123+.. code-block:: idris
124+ %include C "mylib.h"
125+ %link C "mylib.o"
126+
127+Example Makefile
128+
129+.. code-block:: shell
130+ DEFAULT: mylib.o main.idr
131+ idris main.idr -o executableFile
132+
133+ clean:
134+ rm -f executableFile mylib.o main.ibc
135+
118Foreign calls
136Foreign calls
119=============
137=============
120
138