Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
To: "Lyman Neuschaefer" <lyman@bcsisims.com>
Cc: <cygwin@cygwin.com>
Subject: Re: Unresolved references to opendir/readdir/closedir
References: <NDBBIAKKHKMFGDHKLMKPGENFCBAA.lyman@bcsisims.com>
From: Andrew Markebo <flognat@flognat.myip.org>
Date: 05 Mar 2001 23:12:21 +0100
In-Reply-To: <NDBBIAKKHKMFGDHKLMKPGENFCBAA.lyman@bcsisims.com>
Message-ID: <m3g0grvpa2.fsf@master.athome>
Lines: 30
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii


[...]

|  g++  -o svintf SVIntf.o cnf.a \
|  ../message/message.a \
|  ../viewers/table.a \
|  ../common/common.a \
|  ../../../tools/bcgui/bcgui.a \
|  ../../../tools/support/support.a \
|  -L/usr/local/LessTif/Motif2.0/lib -L/usr/X11R6/lib -L/lib -lc -lXm -lXt -lS
| M -lICE -lX11

Here might be a problem, you link in libc before motif, X11 & co,
normally gcc doesn't look back when seatching for symbols, and if the
library is loaded once it doesn't do it again, so if Xm, Xt, SM, ICE,
X11 want to access functions in libc they can't because libC is
already processed...

So either move the -lc to the end of the line, or omit it as suggested
before, because it is handled automagically.

If the problem persists try throwin -v or -V on gcc when linking,
might give you some hints.. 

|  cnf.a(SVIntfLoader.o)(.text+0x2942):SVIntfLoader.C: undefined reference to
| `opendir(char const *)'

*sniff* *sniff* is this X11/Motif or whatever file?

        /Andy

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

