Hi again !
I faced with another issue, which is related to prev topic. When I compile c++ lib using cmake crate, I got this error:
error: linking with `cc` failed: exit status: 1
= note: /usr/bin/ld: cannot find -lsrp6: No such file or directory
collect2: error: ld returned 1 exit status
This is the updated repo to reproduce: GitHub - sergio-ivanuzzo/reproduce-cpp-to-rust
I tried to use srp6 instead of libsrp6 here:
// build.rs
fn main() {
let dst = cmake::Config::new("libsrp6").build();
// libsrp6 was replaced below with srp6
println!("cargo:rustc-link-lib=dylib=libsrp6");
// ...
}
and here:
extern "C" {
// libsrp6 was replaced below with srp6
#[link(name="libsrp6", kind="dylib")]
fn test_srp6(
N_str: *const c_char,
g_str: *const c_char,
B_str: *const c_char,
s_str: *const c_char,
username_str: *const c_char,
password_str: *const c_char
);
}
but error is same. Nothing changed.
Could somebody help me to fix the issue ?