I building AddressBook by link https://developers.eos.io/eosio-home/docs/data-persistence,

EOSIO.CDT (Contract Development Toolkit) Version : 1.3.1

Here is my code:

#include <eosiolib/eosio.hpp>
#include <eosiolib/action.hpp>
#include <eosiolib/contract.hpp>
#include <eosiolib/print.hpp>
#include <string>

using std::string;
using namespace eosio;

CONTRACT addressbook : public eosio::contract {
  using contract::contract;
  ACTION hi( name user ) {
      print( "Hello, ", name{user} );
  TABLE person {
      uint64_t account_name;
      string first_name;
      string last_name;
      string street;
      string city;
      string state;
      uint32_t zip = 0;

      uint64_t primary_key() const { return account_name; }
      uint64_t by_zip() const { return zip; }
 typedef eosio::multi_index<N(people), person> address_index;

EOSIO_DISPATCH( addressbook, (hi) )

Error message:

addressbook.cpp:55:35: error: use of undeclared identifier 'people'
 typedef eosio::multi_index<N(people), person> address_index;

1 Answer 1


Try this...

typedef eosio::multi_index<"people"_n, test::person> address_index;
  • thank you very much, build completed. <3<3<3<3<3<3<3<3
    – Son Le
    Oct 15, 2018 at 12:21
  • They have changed some syntaxes in eosio.cdt which is different than eosiocpp so thats why you have faced this issue.
    – Mr.Y
    Oct 15, 2018 at 12:25
  • 1
    I also know that problem, but because of foreign language, and new programming with c language, eos blockchain is hard to reach. Now, there is another error, can you help me? Thank you eosio.stackexchange.com/questions/2753/…
    – Son Le
    Oct 15, 2018 at 13:12

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.