3

Ubuntu 18.04.1 on VMware (Windows 10 64bit)

EOSIO v1.4.1

eosio.cdt-1.3.2

i just run the compiler like this :

win@ubuntu:~/eos$ eosio-cpp -abigen hello.cpp -o hello.wasm

then, the terminal stopped and the compiler created 2 files.

hello.wasm

hello.wasm.tmpfc9a0c1

because the terminal stopped, i entered ^C. then, the 2 files changed into :

hello.abi

hello.wasm

the abi file is good. but wasm file is broken. of course, i cannot set the contract.

why doesn't the compiler work properly??

i use the following hello.cpp code from the eosio.cdt example.

#include <eosiolib/eosio.hpp>

using namespace eosio;

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

      ACTION hi( name user ) {
         print( "Hello, ", name{user} );
      }
};

EOSIO_DISPATCH( hello, (hi) )
0

2 Answers 2

1

solved and it was because of the virtual machine.
https://github.com/EOSIO/eosio.cdt/issues/123

0

You should be inside of the contract folder before calling eosio-cpp.

Try this:

$ cd ~/eos/contracts/hello
~/eos/contracts/hello/$ eosio-cpp -abigen hello.cpp -o hello.wasm
1
  • it's not the path problem. no issue for the compiler to search "hello.cpp".
    – idnotbe
    Oct 25, 2018 at 21:55

Your Answer

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

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