rust/tests/run-make/link-path-order/main.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
238 B
Rust
Raw Normal View History

2024-04-17 22:47:28 +00:00
use std::ffi::c_int;
2014-09-04 20:41:00 +00:00
2020-09-01 21:12:52 +00:00
#[link(name = "foo", kind = "static")]
extern "C" {
2024-04-17 22:47:28 +00:00
fn should_return_one() -> c_int;
2014-09-04 20:41:00 +00:00
}
fn main() {
2020-09-01 21:12:52 +00:00
let result = unsafe { should_return_one() };
2014-09-04 20:41:00 +00:00
if result != 1 {
std::process::exit(255);
2014-09-04 20:41:00 +00:00
}
}