Skip to content

Commit

Permalink
Updated documentation to reflect static library inclusion facility.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-gorshenev committed Sep 13, 2017
1 parent 6187726 commit 4fc0fbe
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions INTEROP.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,24 @@ Note that this part of the `.def` file is treated as part of the header file, so
functions with body should be declared as `static`.
The declarations are parsed after including the files from `headers` list.

### Including static library in your klib

Sometimes it is more convenient to ship a static library with your product,
rather that assuming it is available within the user environment.
To include a static library into `.klib` use `staticLibrary` and `libraryPaths`
clauses. For example:

```
staticLibraries = libfoo.a
libraryPath = /opt/local/lib /usr/local/opt/curl/lib
```

When given the above snippet the `cinterop` tool will search `libfoo.a` in
`/opt/local/lib` and `/usr/local/opt/curl/lib`, and if found include the
library binary into `klib`.

When using such `klib` in your program the library is linked automatically.

## Using bindings ##

### Basic interop types ###
Expand Down

0 comments on commit 4fc0fbe

Please sign in to comment.