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
Hello @dtolnay !
I have a problem updating the cxx library from 1.0.106 to 1.0.107. Problem with linking.
ARCH: arm
bindings.rs:
[...]#[cxx::bridge]mod ffi {#[derive(Debug)]
struct Item{
pub key:String,
pub value:String,}
#[derive(Debug)]
#[repr(i32)]/// Callback type
pub enumCbType{UNREGISTERED,ERROR,BOOL,U8,U16,U32,U64,F32,}/// Generic Closure in C APIpubstructCClosure{cb:*const c_char,cb_args:*mut c_char
}
#[derive(Debug)]/// CAN frame in C API
pub structCanFrame{id: u32,data:Vec<u8>
}
#[namespace = "rust_part"]
extern "Rust"{typeDriver;unsafefncreate_driver(proto_spec:&CxxString) -> Result<Box<Driver>>;unsafefnencode_cfg_frame(self:&mutDriver,frame_id:&CxxString,items:&CxxVector<Item>) -> CanFrame;fnencode(self:&mutDriver) -> Vec<CanFrame>;fndecode(self:&mutDriver,can_id:u32,data:&Vec<u8>);unsafefnupdate_output_value(self:&mutDriver,var_index:&CxxString,slot_id:u8,state:bool) -> bool;unsafefnregister_var_callback(self:&mutDriver,var_id:u32,var_index:&CxxString,slot_id:u32,cb_type:CbType,callback:CClosure) -> bool;unsafefnregister_event_callback(self:&mutDriver,callback:CClosure,cb_type:CbType) -> bool;fnvalid_protocol(proto_spec:&CxxString) -> bool;}}
Error:
/opt/etos/3.4/sysroots/x86_64-etossdk-linux/usr/libexec/arm-etos-linux-gnueabi/gcc/arm-etos-linux-gnueabi/11.2.0/real-ld: ../deps/ecp-ng/Model/protocol-model/protocol-model-rs/target/armv7-unknown-linux-gnueabihf/release/libprotocol_model_rs.a(protocol_model_rs-35ffc462398a1a8b.protocol_model_rs.4c6a09aa-cgu.11.rcgu.o): in function `<protocol_model_rs::bindings::ffi::Item as cxx::cxx_vector::VectorElement>::__vector_new':
protocol_model_rs.4c6a09aa-cgu.11:(.text._ZN89_$LT$protocol_model_rs..bindings..ffi..Item$u20$as$u20$cxx..cxx_vector..VectorElement$GT$12__vector_new17hde54fff77dbd407aE+0x0): undefined reference to `cxxbridge1$std$vector$Item$new'
collect2: error: ld returned 1 exit status
Hello @dtolnay !
I have a problem updating the cxx library from 1.0.106 to 1.0.107. Problem with linking.
ARCH: arm
bindings.rs:
Error:
Maybe there is a problem with https://docs.rs/cxx/latest/cxx/vector/trait.VectorElement.html ?
My element is:
The text was updated successfully, but these errors were encountered: