简体   繁体   English

Thrift TNonblockingServer.cpp未声明的标识符-Windows

[英]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: 在尝试使用TNonblockingServer构建Thrift (我之前没有,因为它具有libevent依赖项)时,遇到了以下错误:

error C2065: 'EWOULDBLOCK' : undeclared identifier 错误C2065:“ EWOULDBLOCK”:未声明的标识符

which is found in TNonblockingServer. 在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. EWOULDBLOCK在名为force_inc.h的文件中定义,但该文件似乎未包含在TNonblockingServer.h或TNonblockingServer.cpp文件中。

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. 我意识到我可以#include这个文件并完成它,但是我想知道是否有任何使用Thrift的经验的人在遇到此问题之前/知道是否有更优雅的方法可以解决此问题。

Any advice would be much appreciated. 任何建议将不胜感激。

It seems this occurs because I'm porting it over to VS2008, where the force_inc.h headers are not automatically included. 似乎发生这种情况是因为我将其移植到了VS2008,其中没有自动包含force_inc.h标头。 In VS2010 and VS2012, this would not be the case. 在VS2010和VS2012中,情况并非如此。

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

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