I am following the tutorials on EOS's Developer's Portal. My EOS build was successful. I initially had errors with BOOST but it ran fine when I installed it the second time.

This is the code from helloworld.cpp from the tutorial:

#include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>

using namespace eosio;

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

      [[eosio::action]] /* eosio.cdt won't know about the hi() action without an attribute */
      void hi( account_name user ) {
         print( "Hello, ", name{user} );
EOSIO_ABI( hello, (hi)) /* EOSIO_ABI macro to handle the dispatching of actions for the hello contract */

When I tried to compile with the following command:

eosio-cpp -o hello.wasm hello.cpp --abigen

I get the following error: /usr/local/eosio.cdt/bin/wasm-ld: error: undefined symbol: apply

Can someone please help me understand this and fix it?

2 Answers 2


use eosiocpp -o hello.wast hello.cpp and after this use eosiocpp -g hello.abi hello.cpp to compile contract

  • Thank you! That worked although, for me it was eosin-cpp instead of eosiocpp.
    – Jyothi
    Sep 28, 2018 at 15:59
  • eosio-cpp and eosiocpp are different tools. the latter is deprecated
    – confused00
    Sep 28, 2018 at 16:29

I had the same problem while following the EOS tutorials, it appears that not all of them are up to date. In my case I tried updating to the latest(currently) EOSIO v1.7.0 and EOSIO.CDT v1.6.1, cloned the project, rebuild it, installed everything as stated here: https://developers.eos.io/eosio-home/docs/installing-the-contract-development-toolkit and the problem was solved. Hope it helps.

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.