I have custom lib.
#[link(name="mylib")]
extern {
fn from_mylib();
}
fn main() {
println!("try call...");
unsafe {
from_mylib();
}
println!("\n"); // this must call after unsafe block
}
compile and run
$./main
try call...
hello from My Lib!
Why second println! called ALWAYS before unsafe block
Rust version
$ rustc --version
rustc 1.0.0-beta