0

I used the documentation provided by EOSI. I made all the required installation as suggested in the docs. While writing the hello world contract, I face this issue when running the following command eosio-cpp -abigen -o hello.wasm hello.cpp. Please help. I am using Ubuntu 18.04 Machine (As I saw in some posts that this error is machine specific)

hello.cpp:1:10: fatal error: 'eosio/eosio.hpp' file not found
#include <eosio/eosio.hpp>
         ^~~~~~~~~~~~~~~~~
1 error generated.

  • Depending on the version of the cdt you use you may have to use #include <eosiolib/eosio.hpp> instead. – cmadh Jun 10 '19 at 14:46
0

check the eosio.cdt version

1.5.x version using the eosiolib/eosio.hpp

1.6.x version using the eosio/eosio.hpp

|improve this answer|||||
0

The way I do it, just copy the contract files to the folder where eosio-cpp is located (in my case it is in /home/vgagaleski/eosio.cdt/build/bin, navigate to the folder and execute the command. You will see the wasm file in the same folder. p.s change vgagaleski with your username

|improve this answer|||||
0

the version of cdt used required #include <eosiolib/eosio.hpp> instead of #include <eosio/eosio.hpp>.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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