You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@nlohmann it would be great if we could have support for this library within EOS but it's a rather restrictive environment. I cross posted this issue and got a discouraging reply but perhaps something that would encourage you to look into it, as a challenge, perhaps?
This seems to be a problem with the include directories which is more related to the invocation of the compiler rather than the compiler itself. The brew command outputs (brew info nlohmann_json):
If built with CMake support, you can use find_package to use the library.
Without it, please set your include path accordingly:
CPPFLAGS: -I/usr/local/opt/nlohmann_json/include
I do not know the compiler that you are using, but you should try
what I did was just to download, the .hpp, put it in the local directory and include it like #include "json.hpp"; -- however it was a futile effort because EOS is a very restrictive environment and doing Json parsing in it would make the smart contracts substantially larger so I dumped the whole concept
thanks for the reply and attempt to help all the same
I'll start by admitting this may belong in the EOS support but just in case someone here knows about this I'm posting here
cannot seem to include the .hpp file in my EOS project
$ brew tap nlohmann/json
$ brew install nlohmann_json
$ brew test nlohmann_json
$ cat "#include <nlohmann/json.hpp>" > t.cpp
$ eosio-cpp -o t.wasm t.cpp --abigen
successful compilation
using the EOS compiler
develop
branch?the released version
I presume these are run with
brew test ...
-- they ran successfully (no errors)The text was updated successfully, but these errors were encountered: