-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsoncpp compilation error #1
Comments
It is caused by the version of gcc/g++. There are two solutions:
We will fix this bug soon. :) |
Great. By comment off the lines actually worked. Thanks a lot for the help. |
I ran into following error when compiling jsoncpp. jsoncpp Github page suggests it may related to gcc/g++ version and/or standard, but I do not understand the way to solve it in the context of THUNDER.
I am using gcc/g++ 7.3 on Ubuntu 18.04 LTS, cuda 9.1. Thanks for your help in advance.
[ 71%] Linking CXX static library libcore.a
[ 71%] Built target core
Scanning dependencies of target jsoncpp
[ 72%] Building CXX object external/jsoncpp/CMakeFiles/jsoncpp.dir/jsoncpp.cpp.o
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:234:14: error: ‘scoped_ptr’ in namespace ‘std’ does not name a template type
typedef std::scoped_ptr const CharReaderPtr;
^~~~~~~~~~
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp: In function ‘bool Json::parseFromStream(const Json::CharReader::Factory&, std::istream&, Json::Value*, std::__cxx11::string*)’:
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:2007:3: error: ‘CharReaderPtr’ was not declared in this scope
CharReaderPtr const reader(fact.newCharReader());
^~~~~~~~~~~~~
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:2007:3: note: suggested alternative: ‘CharReader’
CharReaderPtr const reader(fact.newCharReader());
^~~~~~~~~~~~~
CharReader
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:2008:10: error: ‘reader’ was not declared in this scope
return reader->parse(begin, end, root, errs);
^~~~~~
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:2008:10: note: suggested alternative: ‘Reader’
return reader->parse(begin, end, root, errs);
^~~~~~
Reader
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp: At global scope:
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:3803:14: error: ‘scoped_ptr’ in namespace ‘std’ does not name a template type
typedef std::scoped_ptr const StreamWriterPtr;
^~~~~~~~~~
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp: In function ‘std::__cxx11::string Json::writeString(const Json::StreamWriter::Factory&, const Json::Value&)’:
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:4924:3: error: ‘StreamWriterPtr’ was not declared in this scope
StreamWriterPtr const writer(builder.newStreamWriter());
^~~~~~~~~~~~~~~
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:4924:3: note: suggested alternative: ‘StreamWriter’
StreamWriterPtr const writer(builder.newStreamWriter());
^~~~~~~~~~~~~~~
StreamWriter
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:4925:3: error: ‘writer’ was not declared in this scope
writer->write(root, &sout);
^~~~~~
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:4925:3: note: suggested alternative: ‘Writer’
writer->write(root, &sout);
^~~~~~
Writer
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp: In function ‘std::ostream& Json::operator<<(std::ostream&, const Json::Value&)’:
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:4931:3: error: ‘StreamWriterPtr’ was not declared in this scope
StreamWriterPtr const writer(builder.newStreamWriter());
^~~~~~~~~~~~~~~
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:4931:3: note: suggested alternative: ‘StreamWriter’
StreamWriterPtr const writer(builder.newStreamWriter());
^~~~~~~~~~~~~~~
StreamWriter
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:4932:3: error: ‘writer’ was not declared in this scope
writer->write(root, &sout);
^~~~~~
/home/jianshi/Downloads/THUNDER-master/external/jsoncpp/jsoncpp.cpp:4932:3: note: suggested alternative: ‘Writer’
writer->write(root, &sout);
^~~~~~
Writer
external/jsoncpp/CMakeFiles/jsoncpp.dir/build.make:62: recipe for target 'external/jsoncpp/CMakeFiles/jsoncpp.dir/jsoncpp.cpp.o' failed
make[2]: *** [external/jsoncpp/CMakeFiles/jsoncpp.dir/jsoncpp.cpp.o] Error 1
CMakeFiles/Makefile2:588: recipe for target 'external/jsoncpp/CMakeFiles/jsoncpp.dir/all' failed
make[1]: *** [external/jsoncpp/CMakeFiles/jsoncpp.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: