Skip to content

Instantly share code, notes, and snippets.

@retep998
Created September 2, 2015 04:09
Show Gist options
  • Save retep998/041f7ce52d455904e9b3 to your computer and use it in GitHub Desktop.
Save retep998/041f7ce52d455904e9b3 to your computer and use it in GitHub Desktop.
extern crate lib;
fn main() {
lib::test();
}
C:\msys64\home\Peter\test> rustc -g lib.rs
C:\msys64\home\Peter\test> rustc -g bin.rs --extern lib=lib.dll
error: cannot satisfy dependencies so `std` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `core` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `collections` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `rustc_unicode` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `alloc` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `libc` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `rand` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: aborting due to 7 previous errors
#![crate_type = "dylib"]
pub fn test() {
println!("Hello world!")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment