getline function

Tom Grove freebsd at voidmain.net
Fri Feb 17 18:55:18 PST 2006


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 <stdio.h>

int main() {
        char line[10];

        getline(&line, 10);
        printf("%s", line);

        return 0;
}
## Source File##

-Tom


More information about the freebsd-questions mailing list