This is the mail archive of the cygwin@cygwin.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: new to-do item


[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 <windows.h>
>
>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/


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