From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Faylor To: Fish Cc: cygwin@cygwin.com Subject: Re: new to-do item Date: Mon, 16 Jul 2001 20:24:00 -0000 Message-id: <20010716232435.A6474@redhat.com> References: <20010716224931.A6039@redhat.com> <000301c10e6e$bb08ebc0$0200a8c0@proteva> X-SW-Source: 2001-07/msg00871.html [This email is the result of a rejected to-do list entry which asked for a new windows function] On Mon, Jul 16, 2001 at 08:15:28PM -0700, Fish wrote: >Then please explain why, when I compile the following test program within the >cygwin shell environment: > >============ >#include > >CRITICAL_SECTION cs; > >int main (int argc, char *argv[]) >{ > InitializeCriticalSection(&cs); > InitializeCriticalSectionAndSpinCount(&cs,4000); > > return 0; >} >============ > >I get the following error: > >============ >gcc -I/usr/Pthreads -Wall -fomit-frame-pointer -DNO_ATTR_REGPARM -DNO_IEEE_SUPPO >RT -DWIN32 -D__LITTLE_ENDIAN=1234 -D__BYTE_ORDER=1234 -DNO_BYTESWAP_H -O3 -malig >n-double -march=pentium -DCCKD_BZIP2 -DHET_BZIP2 -o fishtest.o -c fishtest.c > >fishtest.c: In function `main': >fishtest.c:8: warning: implicit declaration of function >`InitializeCriticalSectionAndSpinCount' > >gcc -I/usr/Pthreads -o fishtest >fishtest.o -L/usr/DLL -lpthreadw32 -lz -lbz2 -XLinker --cref -Xlinker -Map -Xlin >ker fishtest.map > >fishtest.o(.text+0x23):fishtest.c: undefined reference to >`InitializeCriticalSectionAndSpinCount' > >collect2: ld returned 1 exit status >make: *** [fishtest] Error 1 >============ > > >Is this not a cygwin dll issue? No. The Cygwin DLL emulates *UNIX*, not Windows. We don't add Windows system calls to the Cygwin DLL. >If it's not, then *WHO'S* issue is it?? It's either a header file or import library issue. I've cc'ed this email to the cygwin mailing list. Perhaps someone will be willing to research what needs to be done to add this missing function or macro. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/