We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello.
I am trying to generate a C header using cbindgen, using build.rs builder.
here is a code
use std::env; fn main() { println!("cargo:rerun-if-changed=./src/lib.rs"); let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); cbindgen::Builder::new() .with_crate(crate_dir) .with_include_version(true) .with_documentation(false) .with_parse_deps(true) .with_parse_include(&["ffi-support", "opaque-pointer"]) .with_cpp_compat(true) // .with_language(cbindgen::Language::C) .generate() .expect("Unable to generate bindings") .write_to_file("header.h"); }
It still generates C++ header file. Used crate is 0.26.0
Is something wrong with builder itself or maybe i am doing something wrong?
Thanks.
The text was updated successfully, but these errors were encountered:
Sorry for the lag replying to this. You're using with_cpp_compat(true) which generates C++-compatible code, is that not what's going on?
Sorry, something went wrong.
No branches or pull requests
Hello.
I am trying to generate a C header using cbindgen, using build.rs builder.
here is a code
It still generates C++ header file.
Used crate is 0.26.0
Is something wrong with builder itself or maybe i am doing something wrong?
Thanks.
The text was updated successfully, but these errors were encountered: