【问题标题】:Error while building FastCGI in a server running ubuntu在运行 ubuntu 的服务器中构建 FastCGI 时出错
【发布时间】:2012-06-04 04:13:39
【问题描述】:

我想在运行 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

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

【问题讨论】:

    标签: c++ ubuntu cgi fastcgi


    【解决方案1】:

    我注意到 EOF 是一个 C 宏,它需要 stdio.h,它没有包含在 fcgio.cpp 文件中。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-31
      • 1970-01-01
      • 2014-03-04
      • 1970-01-01
      • 2012-07-09
      • 2011-09-05
      相关资源
      最近更新 更多