delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/24/13:09:36

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Sat, 25 Jan 2003 03:08:12 +0900
From: Takayoshi Shimizu <Takayoshi DOT Shimizu AT jp DOT yokogawa DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: undefined reference to `__getreent'
Cc: Takayoshi Shimizu <Takayoshi DOT Shimizu AT jp DOT yokogawa DOT com>
Message-Id: <20030125025603.2D74.TAKAYOSHI.SHIMIZU@jp.yokogawa.com>
MIME-Version: 1.0

This is a rather old subject, but there seem to be no replies yet.

I encountered the same problem recently, and have just escaped from that.

The compile option "-D__linux__" is the cause.
There are some header files which use __linux__ in them.
But cygwin environment (that corresponds to __CYGWIN__) somewhat differs
from __linux__ one.  So using '__linux__' in cygwin has some bad effect
on those header files, I suppose.


> From: "Saturn Wagon" <sw2_1995 at hotmail dot com> 
> To: cygwin at cygwin dot com 
> Date: Fri, 04 Oct 2002 13:49:47 -0500 
> Subject: undefined reference to `__getreent' 
> Bcc: 
> 
> ----------------------------------------------------------------------
> I am compiling a program using CYGWIN tools and am getting an
> undefined reference that I do not know how to resolve.
> 
> Here is an example of the error:
> parse_l.o(.text+0xc8d):parse_l.c: undefined reference to `__getreent'
> 
> Here is the link command that fails:
> /usr/bin/gcc -o pcb.exe -O2 -fno-strength-reduce -D__linux__
> -L/usr/X11R6/lib parse_y.o parse_l.o action.o buffer.o change.o
> command.o control.o copy.o create.o crosshair.o data.o dev_ps.o
> dev_rs274x.o dialog.o draw.o drill.o error.o file.o fileselect.o
> find.o insert.o lgdialog.o library.o log.o main.o mymem.o menu.o
> mirror.o misc.o move.o pinout.o polygon.o print.o printdialog.o
> printpanner.o rats.o report.o remove.o rotate.o rubberband.o search.o
> select.o selector.o set.o sizedialog.o undo.o -lXaw -lXmu -lXt -lSM
> -lICE -lXext -lX11 -lXt -lSM -lICE -lXext -lX11 -lfl -lm -lXpm
> -lcygwin -Wl,--enable-auto-import
> 
> Here is my GCC info:
> $ gcc -dumpversion
> 2.95.3-5
> $ gcc -print-libgcc-file-name
> /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/libgcc.a
> 
> The only thing close to this I have found is a reference to getreent()
> in the file /usr/include/sys/reent.h and a source file that includes the function
> newlib/libc/sys/linux/getreent.c so I tried a -lc argument and a -lcygwin argument but neither worked (same error).
> 
> Does anyone know what library I need to include? I serached all the
> libraries I have installed and could not find the getreent function
> anywhere.


-----
Takayoshi Shimizu


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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