Building Rust lib with dependency on C++ lib with cxx

I am using cxx to interface with a friends c++ lib, meaning I have have .lib, .h, .dlls, and .pdbs. That lib have in turn some external external dependencies which I only have the dlls for. When I set this up I copy-pasted all the dlls to my target folder. However, I'm pretty sure I have messed up the linking (or something else in the build step) because considering I have symbols debugging should work. Debugging a test gives and Unknown error in vscode.

This is my build.rs.

cxx_build::bridge("src/lib.rs")
        .file("src/module.cpp")
        .flag_if_supported("-std=c++17")
        .std("c++17")
        .compile("cxx-bridge");

    println!("cargo:rustc-link-lib=dep/lib/core.framework");

    println!("cargo:rerun-if-changed=src/lib.rs");
    println!("cargo:rerun-if-changed=src/module.cpp");
    println!("cargo:rerun-if-changed=src/module.h");

Have I missed something here?

Also is it possible to have the needed files to be copied to the target folder so I don't have to copy them manually? Best case would be if I could embed them somehow but that is less important.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.