You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mi...@actuera.nl on 2002/07/03 15:55:11 UTC
Readline
Sorry to bother with this (somewhat) off-topic:
Anyone with experience with the readline lib?
I am rebuilding apache as apxs, and that went fine. Also I am building PHP
4 and for one of that components I needed the readline lib (I believe it
was for libxml). If I do a ldconfig -v | grep "readline" I get the readline
lib; man readline gives me neatly stuff about readline and how to use it.
So I write a simple program in C:
#include <stdio.h>
#include <readline/readline.h>
#include <readline/history.h>
int main(void)
{
char *stringey;
stringey = readline("Gimme : ");
printf("You gave : %s\n",stringey);
return 0;
}
I get this error:
$ gcc rdln.c -o rdln
/tmp/ccUtyPAm.o: In function `main':
/tmp/ccUtyPAm.o(.text+0xf): undefined reference to `readline'
collect2: ld returned 1 exit status
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Readline
Posted by Lee Fellows <lf...@4lane.com>.
On Wed, 2002-07-03 at 09:55, Michiel_Lange@actuera.nl wrote:
>
> Sorry to bother with this (somewhat) off-topic:
>
> Anyone with experience with the readline lib?
>
> I am rebuilding apache as apxs, and that went fine. Also I am building PHP
> 4 and for one of that components I needed the readline lib (I believe it
> was for libxml). If I do a ldconfig -v | grep "readline" I get the readline
> lib; man readline gives me neatly stuff about readline and how to use it.
>
> So I write a simple program in C:
>
> #include <stdio.h>
> #include <readline/readline.h>
> #include <readline/history.h>
>
> int main(void)
> {
> char *stringey;
> stringey = readline("Gimme : ");
> printf("You gave : %s\n",stringey);
> return 0;
> }
>
>
> I get this error:
> $ gcc rdln.c -o rdln
> /tmp/ccUtyPAm.o: In function `main':
> /tmp/ccUtyPAm.o(.text+0xf): undefined reference to `readline'
> collect2: ld returned 1 exit status
>
Try 'gcc rdln.c -o rdln -lreadline'
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org