| www.delorie.com/archives/browse.cgi | search |
| 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 |
| X-Authentication-Warning: | comlink.tivlab.raleigh.ibm.com: jerry owned process doing -bs |
| Date: | Tue, 1 Jul 2003 19:37:35 -0400 (EDT) |
| From: | Jerry Heyman <jerry AT corp DOT tivoli DOT com> |
| X-X-Sender: | <jerry AT comlink DOT tivlab DOT raleigh DOT ibm DOT com> |
| Reply-To: | <jheyman AT us DOT ibm DOT com> |
| To: | Martin Gainty <mgainty AT hotmail DOT com> |
| cc: | <cygwin AT cygwin DOT com> |
| Subject: | Re: Dumb Question on GCC |
| In-Reply-To: | <Law10-OE15T2NqFJ3sl00023a81@hotmail.com> |
| Message-ID: | <Pine.GSO.4.33.0307011934170.12498-100000@comlink.tivlab.raleigh.ibm.com> |
| MIME-Version: | 1.0 |
On Tue, 1 Jul 2003, Martin Gainty wrote:
> $ gcc SLPReg.c -L./ -llibcommonlibslp.a -llibcommonslpd.a
> /usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/ld:
> cannot find -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?
-l means that you are specifying a file starting with lib. If you try
-lcommonlibslp -lcommonslpd gcc should be able to determine what it is
you are trying to link with.
Though I doubt it changes anything, I would also personally use:
-L.
rather than
-L./
jerry
>
> ----- Original Message -----
> From: "Elfyn McBratney" <elfyn AT cygwin DOT com>
> To: "Martin Gainty" <mgainty AT hotmail DOT com>
> Cc: <cygwin AT cygwin DOT 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/
>
Jerry Heyman 919.224.1442 | IBM SWG/Tivoli Software|"Software is the
Build Infrastructure Architect| 3901 S Miami Blvd | difference between
jheyman AT us DOT ibm DOT com | Durham, NC 27703 | hardware and reality"
http://www.cs.stedwards.edu/~heyman
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |