Search code examples
c++visual-studio-2008buildcompiler-errorsthrift

Thrift TNonblockingServer.cpp Undeclared Identifier - Windows


In trying to build Thrift with the TNonblockingServer (I hadn't before because it had libevent dependencies), I've come across this error:

error C2065: 'EWOULDBLOCK' : undeclared identifier

which is found in TNonblockingServer. EWOULDBLOCK is defined in a file called force_inc.h, but this file does not appear to be included in either the TNonblockingServer.h or the TNonblockingServer.cpp files.

I realize I could just #include the file and be done with it, but I was wondering if anyone with more experience with Thrift had encountered this issue before/knows if there is a more elegant way to fix this.

Any advice would be much appreciated.


Solution

  • It seems this occurs because I'm porting it over to VS2008, where the force_inc.h headers are not automatically included. In VS2010 and VS2012, this would not be the case.