undefined reference to `_getline' in linking

Eric Blake ebb9@byu.net
Tue Mar 13 23:56:00 GMT 2007


Kristian Hermansen <kristian.hermansen <at> gmail.com> writes:

> 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

So your Linux-hosted mingw cross-compiler doesn't work on ubuntu.  And this 
would have _what_ to do with cygwin, exactly?

By the way, getline is not standardized (yet; the Austin group will be adding 
it to the next version of POSIX, but that won't be for another year or two).  
mingw probably doesn't have it.  And cygwin has it, but it was relatively 
recently that it was added.  You may also be interested in the gnulib project, 
which includes a getline replacement for lacking platforms.

-- 
Eric Blake



--
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/



More information about the Cygwin mailing list