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 17:47:28 -05:00
use std::ffi::c_int;
2014-09-04 15:41:00 -05:00
2020-09-01 16:12:52 -05:00
#[link(name = "foo", kind = "static")]
extern "C" {
2024-04-17 17:47:28 -05:00
fn should_return_one() -> c_int;
2014-09-04 15:41:00 -05:00
}
fn main() {
2020-09-01 16:12:52 -05:00
let result = unsafe { should_return_one() };
2014-09-04 15:41:00 -05:00
if result != 1 {
std::process::exit(255);
2014-09-04 15:41:00 -05:00
}
}