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 {
public:
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?