fcgio.cpp:50行:错误:'EOF'在此范围内未声明

25

我正在尝试在Linux Ubuntu 10.x机器上构建fastcgi。

我运行以下命令:

./configure make

然后我收到以下错误信息:

fcgio.cpp: In destructor 'virtual fcgi_streambuf::~fcgi_streambuf()':
fcgio.cpp:50: error: 'EOF' was not declared in this scope
fcgio.cpp: In member function 'virtual int fcgi_streambuf::overflow(int)':
fcgio.cpp:70: error: 'EOF' was not declared in this scope
fcgio.cpp:75: error: 'EOF' was not declared in this scope
fcgio.cpp: In member function 'virtual int fcgi_streambuf::sync()':
fcgio.cpp:86: error: 'EOF' was not declared in this scope
fcgio.cpp:87: error: 'EOF' was not declared in this scope
fcgio.cpp: In member function 'virtual int fcgi_streambuf::underflow()':
fcgio.cpp:107: error: 'EOF' was not declared in this scope
make[2]: *** [fcgio.lo] Error 1
make[2]: Leaving directory `/somepath/fcgi-2.4.0/libfcgi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/somepath/fcgi-2.4.0'
make: *** [all] Error 2

我发现其他人也遇到了同样的问题,并在各种论坛上提出了这个问题等-然而,截至目前,我还没有看到对这个问题/问题的答案。

有人曾经成功地在Linux上构建过fastcgi吗? 我该如何解决这个问题?

2个回答

43

EOF 是 C 语言的宏定义,看起来你的 fcgio.cpp 文件中没有定义它,或者有些地方将其未定义。我建议先在 fcgio.cpp 文件开头添加 #include <stdio.h>


5
这是否应该报告为一个错误?忘记包含stdio似乎再基础不过了。 - labyrinth
检查文件头上的许可证。有些文件我们甚至不能使用,因为它们是“OpenMarket的秘密”或“版权所有2001年Tux Linux Pengiun”。 - unixman83
1
给他们发一封电子邮件怎么样?:问题是,我找不到一个(可能我错了) - PicoCreator

14

我在Ubuntu 11.10 64位Linux上遇到了同样的问题。在遵循@paercebal大部分建议的情况下,我创建了以下补丁程序,解决了这个问题:

--- include/fcgio.h 2012-01-23 15:23:51.136063795 +0000
+++ include/fcgio.h 2012-01-23 15:22:19.057221383 +0000
@@ -31,6 +31,7 @@
 #define FCGIO_H

 #include <iostream>
+#include <stdio.h>

 #include "fcgiapp.h"

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接