Replies: 1 comment
-
bindgen does not generate func-like macro by default, which requires a very complex implementation (to solve type problems). There is currently a #2369 example implementation However, if you just want to simply add your own implementation, can use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Consider this project with the following files:
mylib.h:
mylib.c
:build.rs
:src/main.rs
:Running
cargo build
will fail witherror[E0425]: cannot find function, tuple struct or tuple variant 'MIN' in module 'mylib'
, looking atbindings.rs
insidetarget/
reveals that no bindings have been generated forMIN
.It looks like
func_macro
callback allows you to semi-automatically generate these bindings, I'd appreciate a small example for the code above. I already looked at #753 and #1793 but I still cannot wrap my head around it.Thank you in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions