C++ apache Thrift TNonblockingServer错误

C++ apache Thrift TNonblockingServer错误,c++,thrift,C++,Thrift,我一直在跟踪。TSimpleServer一切正常。 但是,当我尝试实现TNonblockingServer时,我得到了以下错误:( 我认为它与头文件或名称空间有关。 我使用的标题如下: #include <thrift/protocol/TBinaryProtocol.h> #include <thrift/server/TSimpleServer.h> #include <thrift/transport/TServerSocket.h> #include

我一直在跟踪。TSimpleServer一切正常。 但是,当我尝试实现TNonblockingServer时,我得到了以下错误:(

我认为它与头文件或名称空间有关。 我使用的标题如下:

#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;
#包括
#包括
#包括
#包括
#包括
#包括
#包括
#包括
使用名称空间::apache::thrift;
使用namespace::apache::thrift::protocol;
使用namespace::apache::thrift::transport;
使用namespace::apache::thrift::server;
使用namespace::apache::thrift::concurrency;

你知道怎么了吗?

我知道这真是太晚了。 这是因为缺少TNonblockingServer的libthriftnb库

TsimpleServer和TThreadedServer都在libthrift库中,所以它可以与您一起使用

#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;