delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/01/17:53:24

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: Tue, 1 Jul 2003 22:53:25 +0100
From: Elfyn McBratney <elfyn AT cygwin DOT com>
X-X-Sender: elfyn AT ellixia
Reply-To: cygwin AT cygwin 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-OE47VlFvlRojT00011e7d@hotmail.com>
Message-ID: <Pine.CYG.4.55.0307012250320.2836@ellixia>
References: <Law10-OE47VlFvlRojT00011e7d AT hotmail DOT com>
Mail-Followup-To: cygwin AT cygwin DOT com
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019