delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/06/09/09:17:42

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Mon, 9 Jun 2003 09:17:21 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Lionel Zhou <lzhou AT verizonmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: w32api/windef.h
In-Reply-To: <20030609020730.11538.qmail@verizonmail.com>
Message-ID: <Pine.GSO.4.44.0306090913540.25752-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Sun, 8 Jun 2003, Lionel Zhou wrote:

> ----- Original Message -----
> From: Christopher Faylor <cgf-rcm AT cygwin DOT com>
> Date: Sun, 8 Jun 2003 11:21:43 -0400
> To: cygwin AT cygwin DOT com
> Subject: Re: w32api/windef.h
>
> > On Sun, Jun 08, 2003 at 07:19:30AM -0500, Lionel Zhou wrote:
> > >In file included from utils.c:4:
> > >/usr/include/w32api/windef.h:273: parse error before "void"
> > >
> > >has anyone successfully used the windef.h header and could you tell me
> > >how to compile program like this?
> > >
> > >my windef.h is attached here.
> >
> > #include <windows.h>
> >
> > Not windef.h.  That might help.
> >
> > cgf
>
> thank you christopher and elfyn,
>
> i tried your advice but it doesn't solve the problem.
>
> grep windef /usr/local/w32api/windows.h
> #include <windef.h>
>
> so that windows.h is just a superset of header definitions which
> includes windef.h
>
> program compile with the same error:
>
> In file included from windows.h:48:
>                  from utils.c:4:
> /usr/include/w32api/windef.h:273: parse error before "void"
>
> grep void /usr/include/w32api/windef.h
> #define NULL ((void*)0)
> typedef CONST void *PCVOID,*LPCVOID;
> typedef void *HGDIOBJ;
>
> i also tried the -mwin32 compile flag which lead to more errors because
> of conflicting definitions. the program is wrote for linux and is being
> ported to windows. this is about the only function that uses win32 api
> in this program.
>
> lionel

Lionel,

Check the part of your program *before* the '#include "windows.h"' (either
the program itself, or the header files).  This could be a common C
problem with a missing semicolon after a struct definition (e.g.,
something like

struct AAA {
  int blah;
}

void main(void) { ... }

will give you a similar error).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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