rust - Unable to find crate when compiling even after successfully running `cargo build` -


i've been trying compile project written in rust. when first compiled, got error

error[e0463]: can't find crate `argparse`  --> src/main.rs:6:1   | 6 | extern crate argparse;   | ^^^^^^^^^^^^^^^^^^^^^^ can't find crate 

this seemed dependency error meaning needed use cargo. luckily, project provided cargo.toml file me use. ran cargo build , attempted compile rust source again.

the error persisted opened cargo.toml take look. contained have expected

[package] name = "stones" version = "0.5.0" authors = ["cheezgi <zackh@firemail.cc>"]  [dependencies] argparse = "*" rustyline = "*"  [profile.dev] debug = true 

i ran cargo build -v make sure going expected.

       fresh unicode-width v0.1.4        fresh bitflags v0.4.0        fresh libc v0.2.20        fresh argparse v0.2.1        fresh encode_unicode v0.1.3        fresh nix v0.5.1        fresh rustyline v1.0.0        fresh stones v0.5.0 (file:///users/eamonolive/projects/stones)     finished dev [unoptimized + debuginfo] target(s) in 0.0 secs 

i couldn't see wrong results here, looked installed compiler continues unable find crate argparse.

i'm using rustc 1.19.0 if makes difference.

i ran cargo build , attempted compile rust source again.

cargo runs compiler you. calling cargo build, have implicitly called compiler (rustc) , program built , ready executed: cargo run or ./target/debug/my-app-name.

it's rare occurrence call rustc directly.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -