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
bindgen 自动生成的 bindgen_vtable 是空的,rust-lang/rust-bindgen#27
比如我生成的是
#[repr(C)] pub struct YDQueryResult__bindgen_vtable(::std::os::raw::c_void); #[repr(C)] #[derive(Debug)] pub struct YDQueryResult { pub vtable_: *const YDQueryResult__bindgen_vtable, }
你是如何正常生成 CThostFtdcTraderApi__bindgen_vtable 的呢?
The text was updated successfully, but these errors were encountered:
let bindings = bindgen::Builder::default() .header("wrapper.hpp") .clang_arg("-x") .clang_arg("c++") .clang_arg("-std=c++11") .derive_default(true) .derive_debug(true) .vtable_generation(true) .generate_comments(false) // 不需形成doc ,默认true .layout_tests(false) //不需要test,默认true .generate_comments(false) //不需注释,默认true .derive_copy(true) .derive_hash(false) //不要实现hash .parse_callbacks(Box::new(MyCallback {})) .generate() .expect("Unable to generate bindings");
我之前是让 gpt 写的这段,它缺了 .vtable_generation(true),参考你的加上即可。
.vtable_generation(true)
Sorry, something went wrong.
No branches or pull requests
bindgen 自动生成的 bindgen_vtable 是空的,rust-lang/rust-bindgen#27
比如我生成的是
你是如何正常生成 CThostFtdcTraderApi__bindgen_vtable 的呢?
The text was updated successfully, but these errors were encountered: