标签:des style blog http io ar color os 使用
一. spawn_fastcgi的安装、部署与配置.
fcgio.cpp: In destructor ‘virtual fcgi_streambuf::~fcgi_streambuf()‘:
fcgio.cpp:50:14: error: ‘EOF‘ was not declared in this scope
fcgio.cpp: In member function ‘virtual int fcgi_streambuf::overflow(int)‘:
fcgio.cpp:70:72: error: ‘EOF‘ was not declared in this scope
fcgio.cpp:75:14: error: ‘EOF‘ was not declared in this scope
fcgio.cpp: In member function ‘virtual int fcgi_streambuf::sync()‘:
fcgio.cpp:86:18: error: ‘EOF‘ was not declared in this scope
fcgio.cpp:87:41: error: ‘EOF‘ was not declared in this scope
fcgio.cpp: In member function ‘virtual int fcgi_streambuf::underflow()‘:
fcgio.cpp:113:35: error: ‘EOF‘ was not declared in this scope
make[2]: *** [fcgio.lo] Error 1
make[2]: Leaving directory `/home/lucasysfeng/workspace/web/download/nginx_spawn_fcgi_install_package/fcgi-2.4.1-SNAP-0311112127/libfcgi‘
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lucasysfeng/workspace/web/download/nginx_spawn_fcgi_install_package/fcgi-2.4.1-SNAP-0311112127‘
make: *** [all] Error 2
#include <fcgi_stdio.h> #include <stdlib.h> #include <unistd.h> int main() { int count = 0; while (FCGI_Accept() >= 0) { printf("Content-type: text/html\r\n" "\r\n" "" "FastCGI Hello!" "Request number %d running on host%s " "Process ID: %d\n", ++count, getenv("SERVER_NAME"), getpid()); } return 0; }
2. 编译.
g++ demo.cc -o demo -lfcgi?
标签:des style blog http io ar color os 使用
原文地址:http://www.cnblogs.com/lucasysfeng/p/4125335.html