You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bindgen::Builder::default()// blacklist a bunch of types and functions that hopefully will not be utilized// https://github.com/rust-lang/rust-bindgen/issues/1556#issuecomment-658317813.blocklist_type("LPMONITORINFOEXA?W?")// ....blocklist_function("__C_specific_handler")// The input header we would like to generate// bindings for..header("wrapper.h")// Tell cargo to invalidate the built crate whenever any of the// included header files changed..parse_callbacks(Box::new(bindgen::CargoCallbacks))// Finish the builder and generate the bindings..generate()// Unwrap the Result and panic on failure..expect("Unable to generate bindings");
Actual Results
error: renaming of the library `C` was specified, however this crate contains no `#[link(...)]` attributes referencing this library
Expected Results
I expect it to successfully build.
I suspect my problem is probably related to
let root_dir = env::var("CARGO_MANIFEST_DIR").unwrap();println!("cargo:rustc-link-lib={}",Path::new(&root_dir).join("NUR-lib").display());// Tell cargo to invalidate the built crate whenever the wrapper changesprintln!("cargo:rerun-if-changed=wrapper.h");
I cannot determine what causes the error though or where to even start looking for a fix, I don't understand the implications of this error message, nor have I found another issue related to it other than this.
The text was updated successfully, but these errors were encountered:
Yeah this seems unlikely to be related to bindgen, bindgen intentionally doesn't mess with anything compiler-related, just generates code. That said, maybe the CargoCallbacks are causing trouble? That'd be a bit surprising but... Does removing that help?
If not, can you post some concrete steps to reproduce? Something like:
I cloned the repo and tried building it. The linking error is no longer present. There's an error related to duplicated constants but it seems unrelated to this. Feel free to reopen.
Input C/C++ Header
I have no idea what causes the issue, and so I can't narrow it down, and also I'm not even sure if it's related to the header file
https://github.com/NordicID/nur_sdk/blob/master/native/include/NurAPI.h
Bindgen Invocation
Actual Results
Expected Results
I expect it to successfully build.
I suspect my problem is probably related to
NUR-lib
containsx86
andx64
from https://github.com/NordicID/nur_sdk/tree/master/native/windowsI cannot determine what causes the error though or where to even start looking for a fix, I don't understand the implications of this error message, nor have I found another issue related to it other than this.
The text was updated successfully, but these errors were encountered: