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
Date: Tue, 13 May 2003 20:31:30 -0400
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Subject: Re: Help cross compiling for MingW32 standalone executables.
Message-ID: <20030514003130.GA30218@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <015801c319af$3c3763a0$6400a8c0@FoxtrotTech0001>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <015801c319af$3c3763a0$6400a8c0@FoxtrotTech0001>
User-Agent: Mutt/1.4.1i

On Tue, May 13, 2003 at 08:23:26PM -0400, Bill C. Riemers wrote:
>Here is a specific example:
>
>$ cat test.c
>#include <math.h>
>#include <stdlib.h>
>int main()  {
>  void *s=sin;
>  return (size_t)s;
>}
>
>$ gcc -mno-cygwin -o test.exe test.c -lm
>
>$ strings test.exe |grep dll
>msvcrt.dll
>cygwin1.dll
>KERNEL32.dll
>
>It turns out this example works fine, if I leave off -lm.  If there is a
>flag I can set so a "configure" script will think -lm does not exist, my
>problem would be solved.

Something as simple as

  ar cru /usr/lib/mingw/libm.a

Might solve your problem.

This will produce an empty libm.a file which should be found prior to
the cygwin libm.a.

cgf

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

