2

Considering none of the code is my own, I feel helpless. It's an open source tool, and I can't use it.

This is the tool : http://www.gnucap.org/devel/gnucap-2013-04-23.tar.gz

And these are the errors I get when building on 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

Any help will be great. I feel helpless. If you can suggest resources so I can learn to fix such errors on my own, that would be teaching me how to fish..

1

1 Answer 1

3

You have to include stdio.h in lib/test_readline.cc to define FILE.

1
  • 1
    This seems like an outright bug in readline, and it's still present today in RHEL7. Any file which includes readline needs to include stdio.h first. Dec 4, 2015 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.