current position:Home>eosio. cdt1. 7. The smart contract cannot be compiled

eosio. cdt1. 7. The smart contract cannot be compiled

2022-02-03 20:56:21 Q & A of Denglian community

ubuntu18.04 Environmental Science ,eosio.cdt use deb install ,dpkg -L eosio.cdt Found installed on /usr/opt/eosio.cdt/1.7.0 Catalog , Write a hello.cpp file , Compilation error

#include <eosiolib/eosio.hpp>#include <eosiolib/print.hpp>using namespace eosio;class hello : public contract {    public:        using contract::contract;        [[eosio::action]]            void hi( name user ) {                print( "Hello, ", user);            }};EOSIO_DISPATCH( hello, (hi))#eosio-cpp -o hello.wasm hello.cpp --abigen/eos/dapp/hello/hello.cpp:1:10: fatal error: 'eosiolib/eosio.hpp' file not found#include <eosiolib/eosio.hpp>         ^~~~~~~~~~~~~~~~~~~~

use find lookup /usr/opt/eosio.cdt/1.7.0/include/eosiolib/contracts/eosio/eosio.hpp This file exists again , Whether the environment variable is not set , Please tell me what went wrong .






Other answers 1:


Other answers 2:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032056188559.html

Random recommended