windows.h breaks ObjC ?

Helge Hess helge@mdlink.de
Tue Nov 30 23:39:00 GMT 1999


MarketLogix wrote:
> 
> now try to compile it to object via:
> 
> gcc -c -x objective-c test.c -o test.o
> 
> I get the foillowing:
> 
> Object.h:37: invalid identifier `@struct'
> Object.h:37: parse error before `Object'
> Object.h:38: syntax error before `{'
> Object.h:43: method definition not in class context

I don't remember exactly, but I think windows.h has something like this:

 #define interface struct

and the easy fix is to

 #include <windows.h>
 #undef interface
 #include <objc/objc.h>

although this might affect windows sources somehow (don't know what
interface is good for).

Greetings
  Helge

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list