This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: undefined reference to `errno' -Reply



>> 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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]