This is the mail archive of the
cygwin
mailing list for the Cygwin project.
undefined reference to `_getline' in linking
- From: "Kristian Hermansen" <kristian dot hermansen at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 13 Mar 2007 19:05:36 -0400
- Subject: undefined reference to `_getline' in linking
<snip>
administrator@ubuntu-khermans-desk:/tmp$ cat getline-test.c
#include <stdio.h>
int main() {
FILE *fp;
char *line = NULL;
size_t len = 0;
fp = fopen("/etc/motd", "r");
getline(&line,&len,fp);
}
administrator@ubuntu-khermans-desk:/tmp$ i586-mingw32msvc-gcc
getline-test.c /tmp/ccCRN0HZ.o:getline-test.c:(.text+0x5f): undefined
reference to `_getline'
collect2: ld returned 1 exit status
</snip>
I filed a bug with Ubuntu, as I am unsure if this is a distro-specific
problem or something upstream:
https://bugs.launchpad.net/ubuntu/+source/mingw32/+bug/92072
--
Kristian Hermansen
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/