delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/16/23:26:05

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <cygwin AT cygwin DOT com>
To: Fish <fish AT infidels DOT org>
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 <fish AT infidels DOT org>, cygwin AT cygwin DOT com
References: <20010716224931 DOT A6039 AT redhat DOT com> <000301c10e6e$bb08ebc0$0200a8c0 AT proteva>
Mime-Version: 1.0
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 <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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019