delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/05/11/17:58:06

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <00f301be9bf8$95052690$29acdfd0@InspirePharm.Com>
Reply-To: "Suhaib M. Siddiqi" <ssiddiqi AT ipass DOT net>
From: "Suhaib M. Siddiqi" <ssiddiqi AT ipass DOT net>
To: "Rand Dvorak" <Rand DOT Dvorak AT wdr DOT com>, <cygwin AT sourceware DOT cygnus DOT com>
References: <9905112148 DOT AA02389 AT ch1d2301nwk>
Subject: Re: problem linking with cygwin
Date: Tue, 11 May 1999 17:52:35 -0400
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id RAA19805


> 
> 
> I have some internal unix libs I am trying to compile using cygwin
> and get the following errors when linking:
> 
> when I simply compile with no -l, I get:
> 
> GEN_Hash.o(.text+0x14):GEN_Hash.c: undefined reference to `memalign'
> GEN_Hash.o(.text+0xb2):GEN_Hash.c: undefined reference to `memalign'
> GEN_Hash.o(.text+0x580):GEN_Hash.c: undefined reference to `memalign'
> GEN_Hash.o(.text+0x5c3):GEN_Hash.c: undefined reference to `memalign'
> GEN_Hash.o(.text+0x690):GEN_Hash.c: undefined reference to `memalign'
> GEN_Hash.o(.text+0x77e):GEN_Hash.c: more undefined references to `memalign' follow
> collect2: ld returned 1 exit status
> 

Sounds like you have libraries which do  not provide symbols you need.  You need
another library? to resolve it?



> 
> so then when I use the -lc compiler switch I get:
> 
> C:\cygnus\CYGWIN~1\H-I586~1\bin\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\lib/libcygwin.a(libccrt0.o)(.data+0x0):libccrt0.cc: multiple definition of `_impure_ptr'
> C:\cygnus\CYGWIN~1\H-I586~1\bin\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\lib/libc.a(impure.o)(.data+0x2ec):impure.c: first defined here
> collect2: ld returned 1 exit status
> 


You do not need to add -lc.  libcygwin.a which links autmatically takes care of it.

Try including errno.h, that usually take take care of impure_ptr ( at least in my hands)


> 
> Apologies if I am missing something very basic here.
> 
> Rgds,
> Rand Dvorak
> This message contains confidential information and is intended only 
> for the individual named.  If you are not the named addressee you 
> should not disseminate, distribute or copy this e-mail.  Please 
> notify the sender immediately by e-mail if you have received this 
> e-mail by mistake and delete this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or error-free 
> as information could be intercepted, corrupted, lost, destroyed, 
> arrive late or incomplete, or contain viruses.  The sender therefore 
> does not accept liability for any errors or omissions in the contents 
> of this message which arise as a result of e-mail transmission.  If 
> verification is required please request a hard-copy version.  This 
> message is provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any securities or 
> related financial instruments.
> 
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
> 
> 


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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