delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/04/10/10:30:12

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: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Thu, 10 Apr 2003 10:29:44 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Ronald Landheer-Cieslak <ronald AT landheer DOT com>
cc: Lester Ingber <ingber AT ingber DOT com>, <cygwin AT cygwin DOT com>
Subject: Re: -mno-cygwin and "undefined reference to `_impure_ptr'"?
In-Reply-To: <Pine.LNX.4.44.0304101333310.17056-100000@localhost.localdomain>
Message-ID: <Pine.GSO.4.44.0304101014110.8179-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

This sounds like something that needs to be fixed, if only for
compatibility reasons...  Would creating an empty libm.a for MinGW be a
good idea?  FWIW, I've tried it and it replaces the Cygwin one in the
build...  All I did was

$ cd /usr/lib/mingw && touch dh.c && gcc -c dh.c && ar rsf libm.a dh.o

And then I was able to run

$ gcc -mno-cygwin a.c -lm

with no problems of this sort.
	Igor

On Thu, 10 Apr 2003, Ronald Landheer-Cieslak wrote:

> On Thu, 10 Apr 2003, Lester Ingber wrote:
> > Thanks for your reply.
> >
> > There must be some math library?  This is needed for
> > #include <math.h>
> > in all C packages I've seen.  How can simple functions like sqrt()
> > be calculated?
> >
> > Lester
> "Have a go at it (tm)": just try compiling it without the -lm - I'll bet
> it will just make your headache go away.
>
> AFAIK, I've never used -lm on MinGW, even for projects that needed it on
> other platforms
>
> rlc
>
> > On Thu, Apr 10, 2003 at 12:14:05PM +0200, Ronald Landheer-Cieslak wrote:
> > : Date: Thu, 10 Apr 2003 12:14:05 +0200 (CEST)
> > : From: Ronald Landheer-Cieslak <ronald AT landheer DOT com>
> > : To: Lester Ingber <ingber AT ingber DOT com>
> > : cc: cygwin AT cygwin DOT com
> > : Subject: Re: -mno-cygwin and "undefined reference to `_impure_ptr'"?
> > : In-Reply-To: <20030410060338 DOT GA344 AT ingber DOT com>
> > :
> > : On Thu, 10 Apr 2003, Lester Ingber wrote:
> > : [snip]
> > : > gcc -shared -mno-cygwin -o asadll.dll -Wl,--out-implib=libasadll.dll.a
> > : > -Wl,--export-all-symbols -Wl,--export-dynamic -Wl,--add-stdcall-alias
> > : > -Wl,--enable-auto-import -Wl,--whole-archive asa.o asa_usr.o
> > : > asa_usr_cst.o -Wl,--no-whole-archive -lm
> > :                                        ^^^
> > : See if this is not something linked with Cygwin
> > :
> > : [snip]
> > :
> > : AFAIK, there is no libm.a in the MinGW pack, so the libm.a you're pulling
> > : in links you to something linked to Cygwin.. you'll have to get rid of it.
> > :
> > : HTH
> > : rlc

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Knowledge is an unending adventure at the edge of uncertainty.
  -- Leto II


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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