使用TNonblockingServer 时,如果遇到:
undefined reference to `apache::thrift::server::TNonblockingServer::serve()'
undefined reference to `apache::thrift::server::TNonblockingServer::~TNonblockingServer()'
undefined reference to `apache::thrift::server::TNonblockingServer::~TNonblockingServer()'
这种错误,是缺少 thriftnb.so 的库,在g++后加上 -lthriftnb
如果遇到:
/usr/local/lib/libthriftnb.so: undefined reference to `evhttp_free'
/usr/local/lib/libthriftnb.so: undefined reference to `evhttp_new'
/usr/local/lib/libthriftnb.so: undefined reference to `evbuffer_free'
是缺少libevent 的库,在g++后加上-levent