Could not build idl using anchor

36 Views Asked by At

I tried building an anchor smart contract, but i get this error at the end saying it could not build the idl

Cargo.toml

[package]
name = "basic-0"
version = "0.1.0"
description = "Created with Anchor"
rust-version = "1.60"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "basic_0"

[features]
no-entrypoint = []
cpi = ["no-entrypoint"]
idl-build = ["anchor-lang/idl-build"]

[dependencies]
anchor-lang = { path = "../../../../../lang" }

xargo.toml

[target.bpfel-unknown-unknown.dependencies.std]
features = []

Error logs

Finished release [optimized] target(s) in 0.89s
warning: the following packages contain code that will be rejected by a future version of Rust: libc v0.2.153
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 8`
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
    Finished test [unoptimized + debuginfo] target(s) in 0.62s
     Running unittests src/lib.rs (/Users/davyking/Work/anchor/examples/tutorial/basic-1/target/debug/deps/basic_1-1811eb13d6ab8e6c)
Error: Could not build IDL
0

There are 0 best solutions below