-
Notifications
You must be signed in to change notification settings - Fork 741
Panic because of an invalid Ident #1464
New issue
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
Comments
A reduced test-case would definitely be really helpful. Looks like creduce was timing out somehow, that's really weird. In any case you can probably work around this marking the relevant type as opaque / blacklisted. |
I have little understanding of how to do this. The help in the form here said to strip includes, but the library files seem to be full of includes. What am I supposed to provide?
I have tried adding I also tried |
Ah, I see. Can you attach the whole Does |
I'm afraid this does not work either. Here's my full build.rs (with the blacklist line you suggested) in case I wrote something dumb. extern crate bindgen;
use std::env;
use std::path::PathBuf;
fn main() {
let bindings = bindgen::Builder::default()
.blacklist_type(".*shared_count.*")
.header("wrapper.hpp")
.clang_arg("-std=c++14")
.clang_arg("-Iopensim-core/Bindings")
.clang_arg("-Iopensim-core")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKcommon/include")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKcommon/SmallMatrix/include")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKcommon/Scalar/include")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKcommon/BigMatrix/include")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKcommon/Mechanics/include")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKcommon/Simulation/include")
.clang_arg("-Iopensim-core/dependencies/simbody/Simbody/include")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKcommon/Geometry/include")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKcommon/Random/include")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKcommon/Polynomial/include")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKmath/include")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKmath/Geometry/include")
.clang_arg("-Iopensim-core/dependencies/simbody/SimTKmath/Integrators/include")
.clang_arg("-Iopensim-core/dependencies/simbody/Simbody/Visualizer/include")
.clang_arg("-Iopensim-core/Vendors/lepton/include")
.clang_arg("-I/usr/lib/clang/7.0.0/include/")
.dump_preprocessed_input()
// .generate()
.expect("Unable to generate bindings");
// let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
// bindings
// .write_to_file(out_path.join("bindings.rs"))
// .expect("Couldn't write bindings!");
}
Here it is as a .txt file because github didn't like the .ii. |
Update. let bindings = bindgen::Builder::default()
.header("wrapper.hpp")
.whitelist_type("OpenSim::PinJoint")
.whitelist_type("OpenSim::Body")
.opaque_type("std::.*")
.clang_arg("-std=c++14")
// many clang_arg -I
.generate()
.expect("Unable to generate bindings");
|
Reduced test-case: template <int _Lp> class __shared_count {
public:
__shared_count();
}; |
Input C/C++ Header
I'm trying to generate bindings from this library:
https://github.com/opensim-org/opensim-core/tree/master/
I'm sorry I am not sure what is expected there. My
wrappe.hpp
includes the headers from theBindings
directory of above mentioned libraryI used
dump_preprocessed_input
in mybuild.rs
that generated a 13MB __bindgen.ii, then I used thispredicate.sh
and
creduce ./predicate.sh ./__bindgen.ii
gave me this, which I don't think is what was expectedBindgen Invocation
Actual Results
Expected Results
That it works?
The text was updated successfully, but these errors were encountered: