0

I have compiled a smart contract using eosio-cpp -o addbook.wasm addbook.cpp --abigen command. Compilation was successfull and wasm file got generated. But I cant find abi.

eosio-cpp version is,

eosio-cpp -v 

clang version 7.0.0 (https://github.com/eosio/clang.git 6b886302a11a8419b76e469794ff9d0c531a4b4b) (https://github.com/eosio/llvm 9a9ff09d4302331d3289fdf58a64213506b4aefb)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/opt/eosio.cdt/1.6.0/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Selected multilib: .;@m64

Is there anything I am missing here?

5
  • did u got the answer? May 14, 2019 at 9:04
  • I have downgraded cdt version to 1.5
    – Muhzin
    May 14, 2019 at 11:51
  • The name of class in x.cpp must be identified with the file name.show your source code.
    – 潘业达
    May 24, 2019 at 3:02
  • those conditions are already satisfied @潘业达
    – Muhzin
    May 24, 2019 at 9:05
  • Is this particularly with CDT 1.6.1? I'm having the same issue.
    – k26dr
    Sep 4, 2019 at 21:29

1 Answer 1

2

I wasn't getting an abi file, but it was compiling fine. I finally noticed that I had the file named: widgets.cpp but the class was widget. Watch out for missing "S"s. Ran again and the abi file appeared.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.