bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] readline error when trying to compile the latest version o


From: Elias Mårtenson
Subject: Re: [Bug-apl] readline error when trying to compile the latest version on OSX
Date: Wed, 23 Jul 2014 23:45:05 +0800

The above error happens when I compile without readline. The reason I did that was because of a different error that happens when compiling with readline:

g++ -DHAVE_CONFIG_H -I. -I..     -rdynamic   -g -MT NamedObject.o -MD -MP -MF .deps/NamedObject.Tpo -c -o NamedObject.o NamedObject.cc
clang: warning: argument unused during compilation: '-rdynamic'
In file included from Input.cc:55:
/usr/include/readline/readline.h:40:15: error: typedef redefinition with different
      types ('int (const char *, int)' vs 'Function')
typedef int       Function(const char *, int);
                  ^
./Function.hh:49:7: note: previous definition is here
class Function : public NamedObject
      ^
Input.cc:117:25: error: assigning to 'Function *' from incompatible type 'int ()'
        rl_startup_hook = Input::init_readline_control_C;
                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Input.cc:399:4: error: use of undeclared identifier 'rl_crlf'
   rl_crlf();
   ^
Input.cc:400:4: error: use of undeclared identifier 'rl_delete_text'
   rl_delete_text(0, rl_end);
   ^
Input.cc:401:4: error: use of undeclared identifier 'rl_done'
   rl_done = 1;
   ^
5 errors generated.
make[3]: *** [Input.o] Error 1
make[3]: *** Waiting for unfinished jobs....

Regards,
Elias


On 23 July 2014 23:04, Elias Mårtenson <address@hidden> wrote:
Here's the error:

g++ -DHAVE_CONFIG_H -I. -I..     -rdynamic   -g -MT NamedObject.o -MD -MP -MF .deps/NamedObject.Tpo -c -o NamedObject.o NamedObject.cc
clang: warning: argument unused during compilation: '-rdynamic'
Input.cc:67:39: warning: control reaches end of non-void function [-Wreturn-type]
static char * readline(const char *) {}
                                      ^
Input.cc:69:28: warning: control reaches end of non-void function [-Wreturn-type]
int rl_bind_key(int, int) {}
                           ^
Input.cc:70:38: warning: control reaches end of non-void function [-Wreturn-type]
int rl_parse_and_bind(const char *) {}
                                     ^
Input.cc:117:25: error: assigning to 'void (*)()' from incompatible type 'int ()':
      different return type ('void' vs 'int')
        rl_startup_hook = Input::init_readline_control_C;
                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Input.cc:386:4: error: no matching function for call to 'rl_bind_key'
   rl_bind_key(CTRL('C'), &readline_control_C);
   ^~~~~~~~~~~
Input.cc:69:5: note: candidate function not viable: no known conversion from
      'int (*)(int, int)' to 'int' for 2nd argument
int rl_bind_key(int, int) {}
    ^
Input.cc:399:4: error: use of undeclared identifier 'rl_crlf'
   rl_crlf();
   ^
Input.cc:400:22: error: use of undeclared identifier 'rl_end'
   rl_delete_text(0, rl_end);
                     ^
Input.cc:401:4: error: use of undeclared identifier 'rl_done'
   rl_done = 1;
   ^
3 warnings and 5 errors generated.

Regards,
Elias


reply via email to

[Prev in Thread] Current Thread [Next in Thread]