Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Mon, 16 Jul 2001 23:24:35 -0400 From: Christopher Faylor To: Fish Cc: cygwin AT cygwin DOT com Subject: Re: new to-do item Message-ID: <20010716232435.A6474@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: Fish , cygwin AT cygwin DOT com References: <20010716224931 DOT A6039 AT redhat DOT com> <000301c10e6e$bb08ebc0$0200a8c0 AT proteva> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <000301c10e6e$bb08ebc0$0200a8c0@proteva>; from fish@infidels.org on Mon, Jul 16, 2001 at 08:15:28PM -0700 [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/