delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/01/26/07:00:36

From: rxmtemp AT mcdata DOT com (Raj Menon)
Subject: Re: undefined reference to `errno' -Reply
26 Jan 1998 07:00:36 -0800 :
Message-ID: <s4cc40c1.016.cygnus.gnu-win32@mcdata.com>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

>> When trying to compile netpbm-1mar94.p1 I get a bunch of messages
>> like
>> ../pbm/libpbm.a(libpbm1.o)(.text+0x4e1):libpbm1.c: undefined
>> reference
>>
>> to `errno'

> I had the same when I am trying to compile omniBroker 2.0.2

This shows up when people include a prototype for errno in
their code.  ie.:

extern int errno;

In the GNUWIN32 release, errno is a #define.  To fix this, do the
following:

#ifndef __CYGWIN32__
extern int errno;
#else
#include <errno.h>
#endif

or just remove the prototype and add the include if you don't care about
portability.

-raj


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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