Missing statically linked libraries of dependency



I have a sys crate that builds a static library and links it to the rlib. However, in a crate that depends on this sys crate I’m getting linker errors. Using --verbose I see that none of the cargo options output by the build.rs in the sys crate are being used.

In cmake land, I’m used to various linker options of dependencies propagating. What am I doing wrong?


Try adding extern crate foo_sys somewhere. Rust/Cargo may think it’s unused and not link it.


Ok, looks like I was misreading the output. The missing symbols are things not found inside the static library. So I need to add some addition linker flags for those… initial attempts failed however…


Ok all worked out now. Was a couple of little mix-ups with what I was printing.