ethereum / aleth

Aleth – Ethereum C++ client, tools and libraries
GNU General Public License v3.0
3.96k stars 2.18k forks source link

fatal error: evmc/evmc.h: No such file or directory #5874

Closed XuDafang closed 4 years ago

XuDafang commented 4 years ago

When I run "gcc exmaple.c -o example.o" , error showed "example_host.h:6:10: fatal error: evmc/evmc.h: No such file or directory". example.c is in the path "aleth/evmc/examples/example.c". It seems there's no libarary \<evmc> installed in my local. How to fix it? Thanks!!

gumb0 commented 4 years ago

If you want to build examples of EVMC project from aleth build directory, you could use cmake configure command cmake .. -DEVMC_EXAMPLES=ON.

Or you could do it separately from aleth, creating build directory in evmc, and building there, something like

cd evmc
mkdir build
cd build
cmake ..
make evmc-example-host

The header files that are missing for your command are in evmc/include/evmc