delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/01/08:20:16

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <A9E96A79C068D211A6A90000C07BDF0D88F478@crtsmail.corp.riotinto.org>
From: "Billinghurst, David (CRTS)" <David DOT Billinghurst AT riotinto DOT com>
To: "'cygwin AT sources DOT redhat DOT com'" <cygwin AT sources DOT redhat DOT com>
Subject: g77 -lm doesn't work
Date: Mon, 1 Jan 2001 13:19:56 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

Using cygwin 1.17-1, if I try to link any Fortran program with -lm I get the
error

/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-6/../../../../i686-pc-cygwin/lib/libm
.a(libcmain.o)(.text+0x7f): undefined reference to `WinMain AT 16'
collect2: ld returned 1 exit status

Now libm.a is a symbolic link to libcygwin.a.  I believe the root cause is
linking libcygwin.a before libg2c.a since for any Fortran program I see

g77 foo.f			OK
g77 foo.f -lm			FAIL
g77 foo.f -lg2c -lm		OK
g77 foo.f -lcygwin		FAIL
g77 foo.f -lg2c -lcygwin		OK

Now the obvious solution is to not use -lm, but then I have to edit
Makefiles (or even worse - hack Dejagnu so I can run the g77 testsuite).
Once upon a time the cygwin libm.a was an empty archive.  Can we revert to
this?

+++++++++++++++++++++++++++++++++++++++++
(Mr) David Billinghurst
Comalco Research Centre
PO Box 316, Thomastown, Vic, Australia, 3074
Phone:	+61 3 9469 0642
FAX:	+61 3 9462 2700
Email:	David DOT Billinghurst AT riotinto DOT com DOT au






--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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