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: postgres link failure on cygwin 1.0


Kyle Downey <kyle.downey@amberarcher.com> writes:
> I'm getting a link failure looking for _sys_nerr (from errno.h) when compilin
> g
> postgresql 6.5.3 on cygwin 1.0 (CD distro, unmodified except for addition of
> the CWilson /usr/local and cygipc 1.05 distros. I have notified the maintaine
> r
> about this, but since he says in the docs it compiles on b20.1, I wanted to
> see if it was just a Cygwin b20.1 -> 1.0 change, esp. because it's a system
> call that's missing. I may just have to add a library that I don't know
> about.
> 
> What puzzles me is that _sys_nerr is defined in libcgywin.dll, which is being
> linked against:

You've probably fallen into the trap of *declaring* _sys_nerr as an
external variable without importing it from the DLL. 

Check for the following in your code:
  
  extern int _sys_nerr;

which is incorrect. Remove that and use the definition from <errno.h>,
which is:

  extern int _sys_nerr __declspec(dllimport);

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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