2

我想在运行 ubuntu 的服务器中将 FCGI 与我的 C++ 代码接口。我没有在 FCGI 网站的测试平台列表下找到 ubuntu,但我还是尝试构建它。

./configure似乎工作正常。但是,当我运行时make,我收到 2 个错误,如下所示:

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:113: error: 'EOF' was not declared in this scope
make[2]: *** [fcgio.lo] Error 1
make[2]: Leaving directory '/home/giridhar/fcgi-2.4.1-SNAP-0910052249/libfcgi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/giridhar/fcgi-2.4.1-SNAP-0910052249'
make: *** [all] Error 2

帮助解决此问题将不胜感激。

4

1 回答 1

4

我注意到 EOF 是一个 C 宏,它需要stdio.hfcgio.cpp 文件中未包含的宏。

在 fcgio.cpp 文件中添加 a#include <stdio.h>即可解决问题,现在 FCGI 在 Ubuntu 上构建良好。

于 2012-05-29T22:53:38.063 回答