delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/13/18:05:58

X-Spam-Check-By: sourceware.org
Message-ID: <fe37588d0703131605v2e236af1u7698088f34e581cf@mail.gmail.com>
Date: Tue, 13 Mar 2007 19:05:36 -0400
From: "Kristian Hermansen" <kristian DOT hermansen AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: undefined reference to `_getline' in linking
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

<snip>
administrator AT 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 AT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019