Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Originating-IP: [65.96.48.135]
X-Originating-Email: [mgainty@hotmail.com]
From: "Martin Gainty" <mgainty@hotmail.com>
To: <cygwin@cygwin.com>, <elfyn@cygwin.com>
Cc: <cygwin@cygwin.com>
References: <Law10-OE47VlFvlRojT00011e7d@hotmail.com> <Pine.CYG.4.55.0307012250320.2836@ellixia>
Subject: Re: Dumb Question on GCC
Date: Tue, 1 Jul 2003 18:11:43 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <Law10-OE15T2NqFJ3sl00023a81@hotmail.com>
X-OriginalArrivalTime: 01 Jul 2003 22:11:39.0212 (UTC) FILETIME=[BE9438C0:01C3401D]

$ gcc SLPReg.c -L./ -llibcommonlibslp.a -llibcommonslpd.a
/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/ld:
cannot fi
nd -llibcommonlibslp.a
collect2: ld returned 1 exit status

I put c files, o.files, lib and all files local in same directory  and the
linker still cant find anything Is there any doc on how this works?

Thanks,
Martin

----- Original Message -----
From: "Elfyn McBratney" <elfyn@cygwin.com>
To: "Martin Gainty" <mgainty@hotmail.com>
Cc: <cygwin@cygwin.com>
Sent: Tuesday, July 01, 2003 5:53 PM
Subject: Re: Dumb Question on GCC


> On Tue, 1 Jul 2003, Martin Gainty wrote:
>
> > GCC SlpReg.c
> >
/cygdrive/h/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccwParH7.o(.text+0x11d):SLPReg.c
> > : un
> > defined reference to `_SLPOpen'
> >
> > My header file refers to function SLPOpen not _SLPOpen
> > The .c file calls SLPOpen not _SLPOpen
>
> Meaning? You declare and define that function? Or you declare a library
> function? If the latter, you need to link in the library e.g.
>
>   $ gcc SlpReg.c -L/path/to/library/files -llib
>   (where the path after `-L' is searched for a library named `lib')
>
> > Where does the leading underscore come from ?
> > How do I shut it off the compiler from introducing leading _?
>
> That's how the linker referrs to the symbol name.
>
> Elfyn
> --
>
>
> --
> 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/
>
>

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

