The EOSIO Contract Development Toolkit, CDT for short, is a collection of tools related to contract compilation. Subsequent tutorials use the CDT primarily for compiling contracts and generating ABIs.
Starting from 1.3.x, CDT supports Mac OS X brew, Linux Debian and RPM packages. The easiest option to install would be using one of these package systems. Pick one installation method only.
brew tap eosio/eosio.cdt brew install eosio.cdt
brew remove eosio.cdt
wget https://github.com/eosio/eosio.cdt/releases/download/v1.8.1/eosio.cdt_1.8.1-1-ubuntu-18.04_amd64.deb sudo apt install ./eosio.cdt_1.8.1-1-ubuntu-18.04_amd64.deb
sudo apt remove eosio.cdt
wget https://github.com/eosio/eosio.cdt/releases/download/v1.8.1/eosio.cdt-1.8.1-1.el7.x86_64.rpm sudo yum install ./eosio.cdt-1.8.1-1.el7.x86_64.rpm
$ sudo yum remove eosio.cdt
The location where
eosio.cdt is cloned is not that important because you will be installing
eosio.cdt as a local binary in later steps. For now, you can clone
eosio.cdt to your "contracts" directory previously created, or really anywhere else on your local system you see fit.
git clone --recursive https://github.com/eosio/eosio.cdt cd eosio.cdt
It may take up to 30 minutes to clone the repository
mkdir build cd build cmake .. make -j8
sudo make install
The above command needs to be ran with
eosio.cdt's various binaries will be installed locally. You will be asked for your computer's account password.
eosio.cdt will make the compiled binary global so it can be accessable anywhere. For this tutorial, it is strongly suggested that you do not skip the install step for eosio.cdt, failing to install will make it more difficult to follow this and other tutorials, and make usage in general more difficult.
sudo rm -fr /usr/local/eosio.cdt sudo rm -fr /usr/local/lib/cmake/eosio.cdt sudo rm /usr/local/bin/eosio-*
- Search your errors for the string "/usr/local/include/eosiolib/"
- If found,
rm -fr /usr/local/include/eosiolib/or navigate to
eosiolibusing your operating system's file browser.
Create Development Wallet: Steps to create a new development wallet to store public-private key pair.