I am pretty desperate at this point to search for hints on this issue, though I am pretty sure it's because I'm new to C++ include system.
I am getting an error while trying to run a wasm executable that is a result of my project's compilation in Clion.
I am trying to run simple contract and #include <eosiolib/eosio.hpp>
[100%] Linking LLVM bitcode executable products.bc
[100%] Generating textual assembly products.s
[100%] Generating WAST products.wast
[100%] Generating products.wast.hpp
[100%] Generating WASM products.wasm
[100%] Built target products
I am able to build the project fine, but then receive errors below
../eosiolib/types.h:26:18: error: redefinition of 'time' as different kind of symbol
typedef uint32_t time;
^
/usr/include/time.h:117:8: note: previous definition is here
time_t time(time_t *);
^
followed with
../eosiolib/print.h:86:26: error: unknown type name 'int128_t'
void printi128( const int128_t* value );
^
../eosiolib/print.h:99:27: error: unknown type name 'uint128_t'
void printui128( const uint128_t* value );
I have tried solutions from here and some forum posts, but nothing helped yet.
UPDATE Project Structure Main CMakeLists.txt My smart contract subfolder CMakeLists.txt I wonder if someone might have an empty compilable project for CLion? Those I found were outdated and won't compile
The error below shows that time in lib is conflicting with time in /usr/include. I am not including it anywhere I believe? How do I check where is it included from?
/Users/lonkly/CLionProjects/clarity_demo2/eos_contracts/hello/hello.cpp:1:
In file included from /Users/lonkly/CLionProjects/clarity_demo2/eos_contracts/hello/../eosiolib/eosio.hpp:6:
In file included from /Users/lonkly/CLionProjects/clarity_demo2/eos_contracts/hello/../eosiolib/types.hpp:6:
/Users/lonkly/CLionProjects/clarity_demo2/eos_contracts/hello/../eosiolib/types.h:25:18: error: redefinition of 'time' as different kind of symbol
Full copypaste of error log here