简体   繁体   中英

apache Thrift TNonblockingServer Error

I've been following Thrift C++ wiki tutorial . and everything works fine with TSimpleServer. But, when I try to implement TNonblockingServer I'm getting this error :(

undefined reference to `apache::thrift::server::TNonblockingServer::serve()
undefined reference to `apache::thrift::server::TNonblockingServer::~TNonblockingServer()

I think its something related to the header files or the namespaces. The following headers im using:

#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/server/TSimpleServer.h>
#include <thrift/transport/TServerSocket.h>
#include <thrift/transport/TBufferTransports.h>
#include <thrift/concurrency/ThreadManager.h>
#include <thrift/concurrency/PosixThreadFactory.h>
#include <thrift/server/TThreadedServer.h>
#include <thrift/server/TNonblockingServer.h>

using namespace ::apache::thrift;
using namespace ::apache::thrift::protocol;
using namespace ::apache::thrift::transport;
using namespace ::apache::thrift::server;
using namespace ::apache::thrift::concurrency;

any idea whats wrong?

I understand that this is really late reply. It is due to missing libthriftnb library for TNonblockingServer.

while Tsimplesever and TThreadedServer are in libthrift library so it was works with you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM