getline function

Mike Jeays mj001 at rogers.com
Sat Feb 18 13:00:47 PST 2006


On Sat, 2006-02-18 at 15:33 -0500, Tom Grove wrote:
> #include <stdio.h>
> #include <readline/readline.h>
> #include <readline/history.h>
> 
> int main() {
>         char *line;
> 
>         line = readline("Test: ");
> 
>         return 0;
> } 

It compiles and works with "gcc -o readline readline.c -l readline". You
need to tell the loader about the library.
-- 
Mike Jeays
http://ca.geocities.com/mike.jeays@rogers.com



More information about the freebsd-questions mailing list