eosio.cdt version 1.6.2

OS: Debian GNU/Linux 10

Code Contract

#include <eosio/eosio.hpp>

using eosio::contract;
using eosio::print;
using eosio::name;

CONTRACT hello : public contract {

        using contract::contract;

        ACTION greet (name user) {
            print("Hello world, hello ", name{user}, "!");


EOSIO_DISPATCH(hello, (greet));

enter image description here

1 Answer 1


As a general rule, you should use eosio-init to set up a new helloworld contract. It generates a build with cmake that works without you having to do things manually on the command line.

To run eosio-init and create a project called helloworld, type the following:

eosio-init --project=helloworld

If you must use eosio-cpp directly, then maybe you need to include the -I flag to indicate where the compiler should look for header files?

It could also be that the eosio.cdt you installed didn't install correctly or fully, it can definitely cause problems if you install more than one version of eosio.cdt, for example via apt and also via Github

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.