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
If you want to use Rust logic to implement the interface required by the C++ library, it would be something like this:
lib.rs:
#[cxx::bridge]mod ffi {extern"C"{include!("cmyclass.h");typeCMyClass;// plus, optionally, any accessors that Rust needs to access fields// of the opaque type CMyClass}extern"Rust"{fnc_my_class_callback(this:&mutCMyClass);}}fnc_my_class_callback(this:&mut ffi::CMyClass){// the implementationprintln!("it works");}
Let me make it clear. I got a project which need to use a 3rd C++ library(with lib and header).
To use it , I have to do so in C++:
The text was updated successfully, but these errors were encountered: