gpt4 book ai didi

c++ - 在运行 ubuntu 的服务器中构建 FastCGI 时出错

转载 作者:搜寻专家 更新时间:2023-10-31 01:14:52 24 4
gpt4 key购买 nike

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

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

fcgio.cpp: In destructor 'virtual fcgi_streambuf::~fcgi_streambuf()':<br/>
fcgio.cpp:50: error: 'EOF' was not declared in this scope<br/>
fcgio.cpp: In member function 'virtual int fcgi_streambuf::overflow(int)':<br/>
fcgio.cpp:70: error: 'EOF' was not declared in this scope<br/>
fcgio.cpp:75: error: 'EOF' was not declared in this scope<br/>
fcgio.cpp: In member function 'virtual int fcgi_streambuf::sync()':<br/>
fcgio.cpp:86: error: 'EOF' was not declared in this scope<br/>
fcgio.cpp:87: error: 'EOF' was not declared in this scope<br/>
fcgio.cpp: In member function 'virtual int fcgi_streambuf::underflow()':<br/>
fcgio.cpp:113: error: 'EOF' was not declared in this scope<br/>
make[2]: *** [fcgio.lo] Error 1<br/>
make[2]: Leaving directory '/home/giridhar/fcgi-2.4.1-SNAP-0910052249/libfcgi'<br/>
make[1]: *** [all-recursive] Error 1<br/>
make[1]: Leaving directory '/home/giridhar/fcgi-2.4.1-SNAP-0910052249'<br/>
make: *** [all] Error 2

如果您能帮助解决此问题,我们将不胜感激。

最佳答案

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

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

关于c++ - 在运行 ubuntu 的服务器中构建 FastCGI 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10807610/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com