Replies: 1 comment
-
Hi @vithalsm, this is the GitHub repository of the crates.io package registry. Your issue above seems unrelated to that though. A better place for questions like this is e.g. https://users.rust-lang.org/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to test a rust application linking with a C based shared lib built by . Both C library and rust being compliled in devcontainer environment (Ubuntu 20.04 LTS based).
build.rs has required changes to link to the lib and specify the path. While same things works well when build in my linux dev machine, 'cargo build' fails when tested in devcontainer running on same dev machine. Error:
error: linking with
cc
failed: exit status: 1...
= note: /usr/bin/ld: /work/rust-app/target/debug/deps/rust_app-f390bc1401f0732c.3zy2ogu46grmljay.rcgu.o: in function
rust_app::main': /work/rust-app/src/main.rs:14: undefined reference to
from_the_library'collect2: error: ld returned 1 exit status
= note: some
extern
functions couldn't be found; some native libraries may need to be installed or have their path specified= note: use the
-l
flag to specify native libraries to link= note: use the
cargo:rustc-link-lib
directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)error: could not compile
rust-app
(bin "rust-app") due to previous error**Complete build log attached
cargo-build.log
**
build.rs::
fn main() {
println!("cargo:rustc-link-lib=rtest");
println!("cargo:rustc-link-search=/home/vmohare/rust/rust-conan/libs");
}
Beta Was this translation helpful? Give feedback.
All reactions