尝试构建cygwin时出错

时间:2015-01-18 07:51:54

标签: cygwin readline

考虑到没有任何代码是我自己的,我感到无助。它是一个开源工具,我无法使用它。

这是工具:http://www.gnucap.org/devel/gnucap-2013-04-23.tar.gz

这些是我在Cygwin(Win 7,64b)上构建的错误:

$ ./configure
Configuring gnucap using --prefix=/usr/local
include
lib
In file included from /usr/include/readline/readline.h:35:0,
                 from test_readline.cc:2:
/usr/include/readline/rltypedefs.h:64:28: error: typedef ‘rl_getc_func_t’ is initialized (use decltype instead)
 typedef int rl_getc_func_t PARAMS((FILE *));
                            ^
/usr/include/readline/rltypedefs.h:64:28: error: ‘FILE’ was not declared in this scope
/usr/include/readline/rltypedefs.h:64:28: error: expected primary-expression before ‘)’ token
 typedef int rl_getc_func_t PARAMS((FILE *));
                            ^
/usr/include/readline/readline.h:419:20: error: ‘FILE’ was not declared in this scope
 extern int rl_getc PARAMS((FILE *));
                    ^
/usr/include/readline/readline.h:419:20: error: expected primary-expression before ‘)’ token
 extern int rl_getc PARAMS((FILE *));
                    ^
In file included from test_readline.cc:2:0:
/usr/include/readline/readline.h:542:8: error: ‘FILE’ does not name a type
 extern FILE *rl_instream;
        ^
/usr/include/readline/readline.h:543:8: error: ‘FILE’ does not name a type
 extern FILE *rl_outstream;
        ^
/usr/include/readline/readline.h:565:8: error: ‘rl_getc_func_t’ does not name a type
 extern rl_getc_func_t *rl_getc_function;
        ^
/usr/include/readline/readline.h:867:3: error: ‘FILE’ does not name a type
   FILE *inf;
   ^
/usr/include/readline/readline.h:868:3: error: ‘FILE’ does not name a type
   FILE *outf;
   ^
either libtermcap or libreadline is missing - not using readline
modelgen
main
apps
In file included from /usr/include/readline/readline.h:35:0,
                 from test_readline.cc:2:
/usr/include/readline/rltypedefs.h:64:28: error: typedef ‘rl_getc_func_t’ is initialized (use decltype instead)
 typedef int rl_getc_func_t PARAMS((FILE *));
                            ^
/usr/include/readline/rltypedefs.h:64:28: error: ‘FILE’ was not declared in this scope
/usr/include/readline/rltypedefs.h:64:28: error: expected primary-expression before ‘)’ token
 typedef int rl_getc_func_t PARAMS((FILE *));
                            ^
/usr/include/readline/readline.h:419:20: error: ‘FILE’ was not declared in this scope
 extern int rl_getc PARAMS((FILE *));
                    ^
/usr/include/readline/readline.h:419:20: error: expected primary-expression before ‘)’ token
 extern int rl_getc PARAMS((FILE *));
                    ^
In file included from test_readline.cc:2:0:
/usr/include/readline/readline.h:542:8: error: ‘FILE’ does not name a type
 extern FILE *rl_instream;
        ^
/usr/include/readline/readline.h:543:8: error: ‘FILE’ does not name a type
 extern FILE *rl_outstream;
        ^
/usr/include/readline/readline.h:565:8: error: ‘rl_getc_func_t’ does not name a type
 extern rl_getc_func_t *rl_getc_function;
        ^
/usr/include/readline/readline.h:867:3: error: ‘FILE’ does not name a type
   FILE *inf;
   ^
/usr/include/readline/readline.h:868:3: error: ‘FILE’ does not name a type
   FILE *outf;
   ^
either libtermcap or libreadline is missing - not using readline
done

任何帮助都会很棒。我感到无助。如果你可以建议资源,这样我就可以学会自己解决这些错误,那就教会我如何捕鱼......

1 个答案:

答案 0 :(得分:3)

您必须在stdio.h中加入lib/test_readline.cc来定义FILE