Clap macro not found

Hello I am trying to use claps’ macros but upon compile says they are not found.

use clap::{App}; //v2.33.0

fn main() {
    let matches = App::new("Parse Rain Gage")

    println!("fooo barr!");

and cargo output:

b:\my_rust\test1>cargo build
   Compiling test1 v0.1.0 (B:\my_rust\test1)

error: cannot find macro `crate_version!` in this scope
 --> src\
7 |         .version(crate_version!())
  |                  ^^^^^^^^^^^^^

error: aborting due to 3 previous errors

error: Could not compile `test1`.

You should not add #[macro_use] on use statements. Either

extern crate clap;


use clap::{crate_version, crate_authors, crate_description};

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.