delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/04/05/11:20:58

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-Id: <200004051520.KAA21454@hp2.xraylith.wisc.edu>
To: "Ron Parker" <parkerrd AT hotmail DOT com>
cc: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: mingw using wrong errno definition
In-reply-to: Your message of "Wed, 05 Apr 2000 00:15:00 PDT."
<20000405071501 DOT 75956 DOT qmail AT hotmail DOT com>
Date: Wed, 05 Apr 2000 10:20:32 -0500
From: Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU>

"Ron Parker" <parkerrd AT hotmail DOT com> writes:
> 
> The problem is I am getting the following errors trying to link
> cinstall. I have also included the compile line for the offending file.
> 
> make[1]: Entering directory
> `/home/rdparker/cygwin/obj/i686-pc-cygwin/winsup/cinstall/zlib'
> gcc -DPACKAGE=\"zlib\" -DVERSION=\"1.1.3\" -DHAVE_UNISTD_H=1
> -DHAVE_GETPAGESIZE=1 -DHAVE_MEMCPY=1 -DHAVE_STRERROR=1
> -DHAVE_UNISTD_H=1  -I. -I../../../../../src/winsup/cinstall/zlib
> -I../../../../../src/winsup/cinstall/zlib/..    -g -O2 -W -Wall
> -mno-cygwin -I../../../../src/winsup/mingw/include
> -I../../../../src/winsup/w32api/include -c
> ../../../../../src/winsup/cinstall/zlib/gzio.c
> rm -f libzcygw.a
> ar cru libzcygw.a adler32.o compress.o crc32.o deflate.o gzio.o
> infblock.o infcodes.o inffast.o inflate.o inftrees.o infutil.o trees.o
> uncompr.o zutil.o
> ranlib libzcygw.a
> make[1]: Leaving directory
> `/home/rdparker/cygwin/obj/i686-pc-cygwin/winsup/cinstall/zlib'
> gcc -o setup.exe error.o memory.o setup.o strarry.o cinstall.o -g -O2
> -mno-cygwin zlib/libzcygw.a -lole32 -lwininet -lnetapi32 -ladvapi32
> -luuid
> zlib/libzcygw.a(gzio.o): In function `gz_open':
> /home/rdparker/cygwin/obj/i686-pc-cygwin/winsup/cinstall/zlib/../../../../../
> src/winsup/cinstall/zlib/gzio.c:155:
> undefined reference to `__errno'

This is typical of code that declares it's own errno instead of using the
declaration from system headers. I'm assuming of course that *all* code
here is built using -mno-cygwin so that there's no mix-and-match.

Search for `extern.*int.*errno' in your code. If there is such a thing,
delete and include <errno.h> for both Cygwin and Mingw.

If that's not the case, please send me a download URL for the code or
just email me the package (.tar.gz) if it's under a meg or so.

Regards,
Mumit

- Raw text -


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