Problem with eoscpp - wrong paths

edited January 2018 in EOS Developers

I successfully builded eos and have working node (eosd) but I have a problem with building my own contracts using eoscpp.

When I call eoscpp -n my_new_contract I have message about missing skeleton:
cp: cannot stat '/usr/local/share/skeleton/.': No such file or directory

I can workaround this creating symlink in system but then I will have problem during compilation:

eoscpp -o testw.wast testw.cpp

/home/lukaz/opt/wasm/bin/clang -emit-llvm -O3 --std=c++14 --target=wasm32 -ffreestanding -nostdlib -fno-threadsafe-statics -fno-rtti -fno-exceptions -I /usr/local/include -I . -c testw.cpp -o /tmp/tmp.4PmFLZRoHE/built/testw.cpp
In file included from testw.cpp:5:
./testw.hpp:5:10: fatal error: 'eoslib/eos.hpp' file not found
#include <eoslib/eos.hpp>
1 error generated.

I tryed to install files in system following instructions in the wiki:
cd build
make install

but this only creates install folder inside build and copy files there.

How you setting up your environment to build your own contracts using eoscpp?


  • edited January 2018

    OK. I found workaround. It's ugly but works, at least for me.

    I modified file. At the end is command responsible for compiling project:


    I added cmake parameter responsible for setting install prefix: -DCMAKE_INSTALL_PREFIX=/usr This variable is used by eoscpp ( and now it's pointing correctly to /usr instead of /usr/local

    My modified cmake line looks like this:


    After building project using standard ubuntu full I created deb package:

    cd build

    Now in build folder I had new folder, packages, containing file eos-2.0.1-Linux.deb. I installed it using dpkg:

    sudo dpkg -i eos-2.0.1-Linux.deb

    eoscpp works correctly. All files installed using deb package can be removed from system using

    sudo apt-get remove eos

    How I say I don't like this solution because it require to modify file in project. I suppose somebody with more experience with c++ and cmake may know correct approach.

  • I had same issue and fixed it with "sudo make install" inside "build" folder.
    I first tried without "sudo" and had permission error so retried with "sudo".

    Some more info:

  • I tried 'sudo make install' but for some reason it doesn't work correctly with my system.

    Other thing is that I prefer to have deb package instead of using make.

    But thanks :)

Sign In or Register to comment.