2024-08-04 02:46:04 +00:00
|
|
|
#[link(name = "foo", kind = "static")] // linker should drop this library, no symbols used
|
|
|
|
|
#[link(name = "bar", kind = "static")] // symbol comes from this library
|
|
|
|
|
#[link(name = "foo", kind = "static")] // now linker picks up `foo` b/c `bar` library needs it
|
2020-09-01 17:12:52 -04:00
|
|
|
extern "C" {
|
2014-03-04 13:17:30 -08:00
|
|
|
fn bar();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
unsafe { bar() }
|
|
|
|
|
}
|