I cloned the source and then typed make in terminal but I got these error!
~/src/JsonBenchmarkCpp$ make
if [ ! -d "libs/cajun/cajun" ]; then\
unzip libs/cajun/cajun.zip -d libs/cajun;\
fi
if [ ! -d "libs/json_spirit/json_spirit_v4.05" ]; then\
unzip libs/json_spirit/json_spirit_v4_05.zip -d libs/json_spirit;\
fi
if [ ! -d "libs/libjson/libjson" ]; then\
unzip libs/libjson/libjson_7.4.0.zip -d libs/libjson;\
make -w -Clibs/libjson/libjson;\
fi
g++ -c -Wall -O2 -Ilibs/cajun/cajun -Ilibs/json_spirit/json_spirit_v4.05/json_spirit -Ilibs/libjson/libjson -Ilibs/json-parser main.cpp -o main.o
In file included from libs/libjson/libjson/libjson.h:4:0,
from main.cpp:32:
libs/libjson/libjson/Source/JSONDefs.h:154:6: warning: #warning , Release build of libjson, but NDEBUG is not on [-Wcpp]
In file included from libs/libjson/libjson/Source/internalJSONNode.h:5:0,
from libs/libjson/libjson/Source/JSONNode.h:5,
from libs/libjson/libjson/libjson.h:177,
from main.cpp:32:
libs/libjson/libjson/Source/JSONChildren.h: In constructor ‘jsonChildren::iteratorKeeper::iteratorKeeper(jsonChildren*, JSONNode**&, bool)’:
libs/libjson/libjson/Source/JSONChildren.h:171:10: warning: ‘jsonChildren::iteratorKeeper::myReverse’ will be initialized after [-Wreorder]
libs/libjson/libjson/Source/JSONChildren.h:168:20: warning: ‘jsonChildren* jsonChildren::iteratorKeeper::myChildren’ [-Wreorder]
In file included from libs/libjson/libjson/Source/internalJSONNode.h:5:0,
from libs/libjson/libjson/Source/JSONNode.h:5,
from libs/libjson/libjson/libjson.h:177,
from main.cpp:32:
libs/libjson/libjson/Source/JSONChildren.h:145:5: warning: when initialized here [-Wreorder]
main.cpp: In function ‘void jsonparserBenchmark(std::string)’:
main.cpp:166:18: warning: variable ‘value’ set but not used [-Wunused-but-set-variable]
g++ main.o libs/json-parser/json.c libs/libjson/libjson/libjson.a -lrt libs/json_spirit/json_spirit_v4.05/build/json_spirit/libjson_spirit.a -o JsonBenchmarkCpp
g++: error: libs/libjson/libjson/libjson.a: No such file or directory
g++: error: libs/json_spirit/json_spirit_v4.05/build/json_spirit/libjson_spirit.a: No such file or directory
make: *** [JsonBenchmarkCpp] Error 1
it seems it is looking for libjson.a and libjson_spirit.a but cannot find them! Tried to compile them.
~/src/JsonBenchmarkCpp$ cd libs/json_spirit/json_spirit_v4.05/
~/src/JsonBenchmarkCpp/libs/json_spirit/json_spirit_v4.05$ mkdir build
~/src/JsonBenchmarkCpp/libs/json_spirit/json_spirit_v4.05/build$ cmake ../
CMake Error: The current CMakeCache.txt directory /home/sajjad/src/JsonBenchmarkCpp/libs/json_spirit/json_spirit_v4.05/build/CMakeCache.txt is different than the directory /home/lijo/hack/JsonBenchmarkCpp/libs/json_spirit/json_spirit_v4.05/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "/home/sajjad/src/JsonBenchmarkCpp/libs/json_spirit/json_spirit_v4.05/CMakeLists.txt" does not match the source "/home/lijo/hack/JsonBenchmarkCpp/libs/json_spirit/json_spirit_v4.05/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
What the hell! why cmake generated this make files?! it should not refer to /home/lijo/hack
Then I did this. I went a dir back to root of spirit dir and then build in there!
cd ../
cmake .
rm -rf build/
mkdir build
mv json_spirit/ build/
cd ../../../
make
I cloned the source and then typed
make
in terminal but I got these error!it seems it is looking for libjson.a and libjson_spirit.a but cannot find them! Tried to compile them.
Then I went to compile
json_spirit
What the hell! why cmake generated this make files?! it should not refer to
/home/lijo/hack
Then I did this. I went a dir back to root of spirit dir and then build in there!
now it works :) :100: