Error compilation -- bindgen


#1

hello,
I would like to bind a C header with my Rust program

error: argument must be a string literal
–> src/main.rs:4:10
|
4 | include!(contact!(env!(“OUT_DIR”),"/bindings.rs"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: non-item macro in item position: include
–> src/main.rs:4:1
|
4 | include!(contact!(env!(“OUT_DIR”),"/bindings.rs"));
| ^^^^^^^

error: aborting due to 2 previous errors

thanks :slight_smile:


#2

Just a guess, but presumably it’s because concat! isn’t spelled contact!.