0

I'm attemtping to upgrade our thrift simple server to a nonblocking server. In order to do so, I had to link the thriftnb lib. Linking the nb lib fixed unresolved external errors related to the nonblocking server; however, I am still getting unresolved externals for the thread factories... eg... posix or boost thread factory. I would assume thrift concurrency also lives in the nb lib (or the general thrift lib). As far as I can tell, there are only two thrift libs, so what am I missing?

Thanks!

thrift 0.11 C++ 11

user3029642
  • 909
  • 3
  • 10
  • 23
  • Possible duplicate: https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix/26233563 – Jesper Juhl Oct 30 '18 at 20:14
  • This is not a general question about unresolved externals. It is a specific question about thrift libs. – user3029642 Oct 31 '18 at 00:39

1 Answers1

0

I'm still not sure why the boost and posix thread factories are missing, but the StdThreadFactory is working. For anyone that is interested, this is my config:

std::shared_ptr<apache::thrift::protocol::TProtocolFactory> protocolFactory(new apache::thrift::protocol::TBinaryProtocolFactory());
        std::shared_ptr<apache::thrift::transport::TProcessor> processor(new cimnetservicerefactor::CIMNetServiceRefactorProcessor(stdHandler));
        std::shared_ptr<apache::thrift::TProcessorFactory> processorFactory(new apache::thrift::TSingletonProcessorFactory(processor));
        std::shared_ptr<apache::thrift::transport::TNonblockingServerTransport> serverTransport(new LocalhostOnlyServerSocket(port, machineName, localConnectionsOnly));
        shared_ptr<apache::thrift::concurrency::StdThreadFactory> threadFactory = shared_ptr<apache::thrift::concurrency::StdThreadFactory>(new apache::thrift::concurrency::StdThreadFactory());
        threadManager->threadFactory(threadFactory);
        threadManager->start();
        apache::thrift::server::TNonblockingServer server(processorFactory, protocolFactory, serverTransport, threadManager);
user3029642
  • 909
  • 3
  • 10
  • 23