Skip to content

Adding include path #152

Answered by keynmol
faveoled asked this question in Q&A
Discussion options

You must be logged in to vote

The flags that you add to nativeConfig are 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 Binding has a clangFlags parameter 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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by faveoled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants