-
|
I'm getting the following error: Is there a way to add addditional clang path when using sn-bindgen? nativeConfig ~= { c =>
c.withCompileOptions(c.compileOptions :+ "-I/usr/include/glib-2.0")
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The flags that you add to But when you use bindgen, is uses libclang - which is an interface to Clang, which needs to be configured separately. This is a long way of saying that See example here: https://github.com/indoorvivants/sn-bindgen-examples/blob/main/build.sbt#L225 |
Beta Was this translation helpful? Give feedback.
The flags that you add to
nativeConfigare what Scala Native uses to compile your code.But when you use bindgen, is uses libclang - which is an interface to Clang, which needs to be configured separately.
Basically bindgen is invoking mini-compiler, so it also needs all the paths that regular clang would need.
This is a long way of saying that
Bindinghas aclangFlagsparameter which is just a list of strings that will be passed to clang used by bindgen.See example here: https://github.com/indoorvivants/sn-bindgen-examples/blob/main/build.sbt#L225