7/27/2023 0 Comments Cargo rust![]() The problem seems to be with: println!(r"cargo:rustc-link-search=lib\") This works fine when I build the library, but downstream libraries which depend on the wrapper library get compilation failures: error: could not find native static library `wrapped-lib`, perhaps an -L flag is missing? Println!(r"cargo:rustc-link-search=lib\") I've put the C libraries in the lib directory and I am using build.rs to tell the compiler where to find the libraries to link with: println!("cargo:rustc-link-lib=static=wrapped-lib") Questions and suggestions are always welcome.I am creating a Rust wrapper around a C library. You now know all the essentials about installing Rust on Ubuntu and other Linux distributions. Here's the replay uninstall Rust with apt command: Uninstall Rust with APT Now run the autoremove: sudo apt autoremove To remove Rust, you can remove Cargo first and then use the autoremove command to remove the dependencies installed with it. Let me quickly show the uninstall step as well. Here's a replay of Rust installation with apt in Ubuntu. You may verify that Rust is installed for you and all the other users (if you want to): Verify the Rust Install You are, of course, free to use apt install rustc and install only Rust. You’ll be asked to enter your account’s password. Since Cargo includes rustc, I would advise installing it so that all required packages are installed in one go. As a programmer, you’ll need Cargo to get other Rust packages or create your own.
0 Comments
Leave a Reply. |