Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

hello.abi is wrong #2029

Closed
OuterSpaceTears opened this issue Apr 2, 2018 · 6 comments
Closed

hello.abi is wrong #2029

OuterSpaceTears opened this issue Apr 2, 2018 · 6 comments
Assignees

Comments

@OuterSpaceTears
Copy link

feng@feng-B250-HD3P:~/workSpace/eos/build/contracts/hello$ eosiocpp -o hello.wast hello.cpp

hello.cpp
`#include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>
using namespace eosio;

class hello : public eosio::contract {
public:
using contract::contract;

  /// @abi action  
  void hi( account_name user ) { 
     print( "Hello, ", name{user} ); 
  } 

};

EOSIO_ABI( hello, (hi) ) `

hello.abi
{ "types": [], "structs": [], "actions": [], "tables": [] }
@bytemaster
Can you help me?Thank you very much.

@elmato
Copy link
Contributor

elmato commented Apr 2, 2018

@OuterSpaceTears how are you generating the ABI file?
Which OS are you using?

@ZeroPointThree17
Copy link

@elmato I get the same thing and I’m on Ubuntu 17.10 x64

@elmato
Copy link
Contributor

elmato commented Apr 3, 2018

Can you paste the command you are using to generate hello.abi and the output it gives?

@ZeroPointThree17
Copy link

I needed to sudo make install on the eos/build dir and tried generating the abi again and it worked! Thanks @elmato for helping me find what the issue was.

@elmato
Copy link
Contributor

elmato commented Apr 3, 2018

@OuterSpaceTears looking at the empty ABI file format, it seems that you are using an older version of the abi generator (eosio-abigen) which is called by eosiocpp.

Make sure you are doing make install after building the project.

@OuterSpaceTears
Copy link
Author

I implemented./eos_build.sh, did not execute sudo make install, and solved this problem through sudo make install. Thank you very much.
@elmato

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants