1. src/thrift/protocol/TJSONProtocol.cpp:531:9: error: 'signbit' is not a member of 'boost::math'
解决方案:boost库版本太低,更换到1.48可解决此问题
2. src/thrift/protocol/TJSONProtocol.cpp:825:11: error: 'runtime_error' is not a member of 'std'
解决方案:g++版本过低,更换到gcc/g++ 4.8,且需要在TJSONProtocol.cpp前加上#include<stdexcept>
即可解决此问题
3. ./lib/cpp/test/processor/ProcessorTest.cpp 出现undefined reference to main以及抛出若干链接错误
经过分析发现,需要在上述文件头加上:
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_ALTERNATIVE_INIT_API
前两行,是作为开关,在boost/test/unit_test.hpp中加入main函数
第三行是这样做之后会在其中某个文件出现redefined类错误,加入此开关可以关掉规避
至于链接错误,需要在对应目录下的Makefile中增加-lboost_unit_test_framework即可解决