![](/img/trans.png)
[英]Apache thrift undefined reference to apache::thrift::server::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.