fcgio.cpp:50: error: 'EOF' was not declared in this scope

前端 未结 3 1501
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-04 00:01

I am attempting to build fastcgi on a Linux Ubuntu 10.x machine.

I run the following commands:

./configure make

and I get the following error:

         


        
相关标签:
3条回答
  • 2021-02-04 00:47

    I had the same problem on Ubuntu 11.10 Linux 64bit. Following most of @paercebal's advice I created the following patch which resolved the problem:

    --- 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 讨论(0)
  • 2021-02-04 00:51

    Use -1 instead

    EOF is defined in <stdio.h> as follows:

    #define EOF (-1)
    

    or (more professionally), you may put the following code above your main() or inside your header file:

    #ifndef EOF
    #define EOF (-1)
    #endif
    
    0 讨论(0)
  • 2021-02-04 00:59

    EOF is a C macro and seems that you do not have it defined in fcgio.cpp or that something has undefined it. I would first try to add #include <stdio.h> to start of fcgio.cpp.

    0 讨论(0)
提交回复
热议问题