X-Spam-Check-By: sourceware.org Message-ID: <45F7364E.F3064146@dessent.net> Date: Tue, 13 Mar 2007 16:39:58 -0700 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: undefined reference to `_getline' in linking References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Kristian Hermansen wrote: > administrator AT ubuntu-khermans-desk:/tmp$ cat getline-test.c > #include > > 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 > > > 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 What has this got to do with Cygwin? This is not a support list for Ubuntu or MinGW. The answer you're probably fishing for is that MinGW (or rather MSVCRT.DLL) does not implement getline, so you shouldn't expect this to work. Brian -- 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/