Found staticlib .. instead of rlib or dylib.
Consider the following two files:
a.rs
#![crate_type = "staticlib"]
fn foo() {} main.rs
extern crate a;
fn main() {
a::foo();
} Crate a is compiled as a staticlib. A staticlib is a system-dependant library only intended for linking with non-Rust applications (C programs). Note that staticlibs include all upstream dependencies (core, std, other user dependencies, etc) which makes them significantly larger than dylibs: prefer staticlib for linking with C programs. Learn more about different crate_types in this section of the Reference.
This error can be fixed by:
rlib or dylib; formats suitable for Rust linking.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0462.html