2

I have installed eosio.cdt in Ubuntu system by using commands from EOS Developers Portal

wget https://github.com/EOSIO/eosio.cdt/releases/download/v1.4.1/eosio.cdt-1.4.1.x86_64.deb
sudo apt install ./eosio.cdt-1.4.1.x86_64.deb 

After that I have tried to compile the hello contract using eosio-cpp tool

#include <eosiolib/eosio.hpp>

using namespace eosio;

class [[eosio::contract("hello")]] hello : public contract {
  public:
      using contract::contract;

      [[eosio::action]]
      void hi( name user ) {
         print( "Hello, ", user);
      }
};

EOSIO_DISPATCH( hello, (hi))

I have tried to compile the code using

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

But it returns

/usr/opt/eosio.cdt/1.4.1/bin/clang-7: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/opt/eosio.cdt/1.4.1/bin/clang-7)

Is there anything I am missing here?

1

1 Answer 1

1

I have solved the issue by using below commands

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo apt-get install --only-upgrade libstdc++6
2
  • still getting the same error, i tried installing libstdc++6 and update too. Apr 11, 2019 at 5:23
  • please check the edited answer @cjcoders
    – Muhzin
    May 6, 2019 at 4:36

Your Answer

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

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