繁体   English   中英

Apache Thrift TNonblockingServer错误

[英]apache Thrift TNonblockingServer Error

我一直在关注Thrift C ++ Wiki教程 并且TSimpleServer一切正常。 但是,当我尝试实现TNonblockingServer时,出现此错误:(

undefined reference to `apache::thrift::server::TNonblockingServer::serve()
undefined reference to `apache::thrift::server::TNonblockingServer::~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;

你知道怎么了吗?

我了解这确实是晚答复。 这是因为缺少TNonblockingServer的libthriftnb库。

Tsimplesever和TThreadedServer在libthrift库中,因此可以使用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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