On 18/02/06 Tom Grove said:
> That works and I had looked into that earlier...it seems like it does a
> lot more than just one function from the man page. I guess I can use
> that for now but I wonder why getline() is broken in gcc on FreeBSD?
getline() is from glibc. FreeBSD uses it's own lib
question is being that it's not standard and gets() is not safe
> to use what should I use to grab lines? My gut tells me to
> copy the getline() function from the K&R book but I'm not
> totally sure that's a great idea either. Stupid strings always
> causing pr
gt;>> Yeah...I see that after some more research. So, now I guess my question
>>> is being that it's not standard and gets() is not safe to use what
>>> should I use to grab lines? My gut tells me to copy the getline()
>>> function from the K
On Sat, 2006-02-18 at 15:33 -0500, Tom Grove wrote:
> #include
> #include
> #include
>
> 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
On Sat, 2006-02-18 at 13:00 -0500, Tom Grove wrote:
> Mike Jeays wrote:
> > On Fri, 2006-02-17 at 21:54 -0500, Tom Grove wrote:
> >
> >> Is there anyone who can compile a program using the getline() function?
> >> Here is a really simple progra
Tom Grove wrote:
> ##Error##
> /var/tmp//ccqxIZxQ.o(.text+0x25): In function `main':
> : undefined reference to `readline'
> ##Error##
You forgot to pass -lreadline to the compiler.
--
James Bailie <[EMAIL PROTECTED]>
http://www.jamesbailie.com
___
fr
() is not safe to use what
should I use to grab lines? My gut tells me to copy the getline()
function from the K&R book but I'm not totally sure that's a great idea
either. Stupid strings always causing problems!
Depending on what you'd like to do, GNU readline may be
t safe to use what
> should I use to grab lines? My gut tells me to copy the getline()
> function from the K&R book but I'm not totally sure that's a great idea
> either. Stupid strings always causing problems!
Depending on what you'd like to do, GNU readline may be a
Mike Jeays wrote:
On Fri, 2006-02-17 at 21:54 -0500, Tom Grove wrote:
Is there anyone who can compile a program using the getline() function?
Here is a really simple program to recreate the following error:
##Error##
/var/tmp//ccvYIi4C.o(.text+0x26): In function `main':
: unde
?
getline() is not part of the standard C library.
What makes you think gcc is broken...?
Yeah...I see that after some more research. So, now I guess my question
is being that it's not standard and gets() is not safe to use what
should I use to grab lines? My gut tells me to copy the ge
Tom Grove wrote:
> Mike Jeays wrote:
[ ... ]
> That works and I had looked into that earlier...it seems like it does a
> lot more than just one function from the man page. I guess I can use
> that for now but I wonder why getline() is broken in gcc on FreeBSD?
getline() is not part of the standar
Mike Jeays wrote:
On Fri, 2006-02-17 at 21:54 -0500, Tom Grove wrote:
Is there anyone who can compile a program using the getline() function?
Here is a really simple program to recreate the following error:
##Error##
/var/tmp//ccvYIi4C.o(.text+0x26): In function `main':
: unde
On Fri, 2006-02-17 at 21:54 -0500, Tom Grove wrote:
> Is there anyone who can compile a program using the getline() function?
> Here is a really simple program to recreate the following error:
>
> ##Error##
> /var/tmp//ccvYIi4C.o(.text+0x26): In function `main':
> :
Is there anyone who can compile a program using the getline() function?
Here is a really simple program to recreate the following error:
##Error##
/var/tmp//ccvYIi4C.o(.text+0x26): In function `main':
: undefined reference to `getline'
##Error##
##Source File##
#include
14 matches
Mail list logo