You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Next configure the plugin using the settings scoped to either `Compile` or `Test`:
15
+
16
+
|---------------------------|-------------------|
17
+
|`nativeBindgenHeader` | The C header file to read.
18
+
|`nativeBindgenPackage` | Package of the enclosing object. No package by default.
19
+
|`name in nativeBindgen` | Name of the enclosing object.
20
+
|`nativeBindgenLink` | Name of library to be linked.
21
+
22
+
@@@ note
23
+
24
+
By default the `scala-native-bindgen` executable is downloaded automatically for supported platforms. Set `version in nativeBindgen` (unscoped) to configure the version of the `scala-native-bindgen` to use if you want a version different from the version of the sbt plugin.
25
+
26
+
In case your platform is not supported, you must compile `scala-native-bindgen` yourself and configure the path to the executable using `nativeBindgenPath`, e.g.:
nativeBindgenHeader := (resourceDirectory in Compile).value /"header.h",
41
+
nativeBindgenPackage :=Some("org.example.mylib"),
42
+
nativeBindgenLink :=Some("mylib"), // Will pass `-lmylib` to the linker
43
+
nativeBindgenExclude :=Some("__"),
44
+
name in nativeBindgen :="MyLib"
45
+
))
46
+
```
47
+
48
+
Running `nativeBindgen` will generate a file named `target/scala-2.x/src_managed/main/sbt-scala-native-bindgen//ScalaNativeBindgen.scala` containing something along the following lines:
0 commit comments