delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/11/03/19:06:07

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Wed, 3 Nov 1999 14:26:45 -0500
To: Mumit Khan <khan AT thor DOT xraylith DOT wisc DOT edu>
Cc: John Fralinger <fralinjh AT ei DOT dupont DOT com>, cygwin AT sourceware DOT cygnus DOT com
Subject: Re: sys_errlist
Message-ID: <19991103142645.A22613@cygnus.com>
Mail-Followup-To: Mumit Khan <khan AT thor DOT xraylith DOT wisc DOT edu>,
John Fralinger <fralinjh AT ei DOT dupont DOT com>,
cygwin AT sourceware DOT cygnus DOT com
References: <00cc01bf2629$ba5e9aa0$9a5c37c0 AT ei DOT dupont DOT com> <199911031852 DOT MAA20052 AT mercury DOT xraylith DOT wisc DOT edu>
Mime-Version: 1.0
X-Mailer: Mutt 0.95.6i
In-Reply-To: <199911031852.MAA20052@mercury.xraylith.wisc.edu>; from Mumit Khan on Wed, Nov 03, 1999 at 12:52:11PM -0600

I believe that this is one of a few data elements which was
moved into the DLL after B20.1.

So, you do have to use the definition in errno.h and (obviously?)
recompile the code in question.

cgf

On Wed, Nov 03, 1999 at 12:52:11PM -0600, Mumit Khan wrote:
>John Fralinger <fralinjh AT ei DOT dupont DOT com> writes:
>>I get undefined reference to `sys_errlist` when compiling and linking with
>>Cygwin 1.0 CD.  Same source and Makfiles have no problem on B20.1.
>>
>>What am I doing wrong?
>
>Make sure you don't declare sys_errlist in your code, and instead include
><errno.h> to get the extern declaration. This is a change since b20.1,
>which used a static version of sys_errlist, and in CD 1.0/dev snapshots,
>it's imported from the DLL.
>
>Try the following *untested* (I don't have 1.0 CD nor dev snapshots
>installed to test), and see if this works:
>
>  #include <errno.h>
>  #include <stdio.h>
>
>  int
>  main ()
>  {
>    int i;
>    for (i = 0; i < _sys_nerr; i++)
>      {
>	printf ("%-3d: %s\n", i, _sys_errlist[i]);
>      }
>    return 0;
>  }
>
>Regards,
>Mumit

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