I'm making a library which I want to call from C/++. I have a main rust crate (rlib), then a simple wrapper crate that wraps the main crate's functionality using extern "C" functions. If I build the wrapper crate as a staticlib I can link against it from C++ just fine, and everything works as expected. If I change my crate type to dylib though I get a whole bunch of undefined symbols when trying to link to it from C++:
/usr/bin/ld: warning: libstd-d52e1299537ab398.so, needed by
/home/anders/packages/rama/0.1.0/lib/librama.so, not found (try using -rpath or -rpath-link)
/home/anders/packages/rama/0.1.0/lib/librama.so: undefined reference to `std::io::stdio::Stdout::lock::h25c724b0429bb7d6'
... etc etc x100...
I don't see the libstd-d52e1299537ab398.so anywhere in my target directory, although I do see some .so's for dependent crates (e.g. serde).