2011-01-02 4 views
23

Linux Ubuntu 10.x 시스템에서 fastcgi를 빌드하려고합니다.fcgio.cpp : 50 : 오류 : 'EOF'가이 범위에서 선언되지 않았습니다.

./configure를 나는 다음과 같은 오류가 발생합니다 :

나는 다음과 같은 명령을 실행

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 

나는 다른 사람들이 동일한 문제가 있었이 요구 한 것을 알 수 다양한 fora 등에서의 질문 - 그러나 나는 아직이 질문/문제에 대한 답을 보지 못했습니다.

Linux에서 fastcgi를 구축 한 사람은 누구입니까? 이 문제는 어떻게 해결합니까?

답변

42

EOF는 C 매크로이며 fcgio.cpp에 정의되지 않았거나 무언가가 정의하지 않은 것으로 보입니다. 먼저 fcgio.cpp 시작 부분에 #include <stdio.h>을 추가하려고합니다.

+5

버그로보고해야합니까? stdio를 포함하는 것을 잊는 것보다 더 기본적인 것을 얻는 것이 어려워 보입니다. ... – labyrinth

+0

헤더의 라이센스를 확인하십시오. 일부 파일은 "OpenMarket 또는 저작권 2001 Tux Linux Pengiun에 대한 비밀"때문에 사용할 수 없습니다. – unixman83

+1

어때 이것에 이메일을 보내? : 문제는, 내가 찾을 수 없습니다 (내가 틀릴 수도) – PicoCreator

14

나는 우분투 11.10 리눅스 64 비트에서 같은 문제가 있었다. @ 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" 
+0

덕분에, 그것을 패치로 적용하는 것이 훨씬 더 빠르다. – rage

-1

사용 -1 다음과 같이 대신

EOF는 <stdio.h>에 정의되어있다 : (더 전문적으로)

#define EOF (-1) 

또는 main() 또는 헤더 파일 내에 다음 코드를 넣을 수 있습니다.

#ifndef EOF 
#define EOF (-1) 
#endif 
+2

EOF가 stdio.h에 정의되어 있다고 지적하면 #include에 # 다른 답변자가 언급 한대로)? – Brandin

관련 문제