home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky gnu.gcc.help:3033 de.comp.gnu:332
- Newsgroups: gnu.gcc.help,de.comp.gnu
- Path: sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!Germany.EU.net!ppgfr!mars!wolpert
- From: wolpert@mars (Florian Wolpert)
- Subject: objc.h broken ?
- Message-ID: <1993Jan26.091448.16939@ppgfr.uucp>
- Sender: news@ppgfr.uucp
- Nntp-Posting-Host: mars
- Organization: PPG Hellige GmbH, Freiburg, GERMANY
- X-Newsreader: Tin 1.1 PL4
- Date: Tue, 26 Jan 1993 09:14:48 GMT
- Lines: 61
-
- Hi ObjC-users,
-
- i have just installed gcc 2.3.2 with the objc-frontend and tried to compile
- (not even link) a short example objc-file. But following happens:
-
- prompt> gcc -I/src/gnu/gcc-2.3.2 Int.m -c
- ..
- [warning about #import deleted]
- ..
- In file included from /src/gnu/gcc-2.3.2/objc/Object.h:29, from Int.m:2:
- /src/gnu/gcc-2.3.2/objc/objc.h:346: parse error before `va_list'
- prompt>
-
- The line 346 in objc.h looks like this:
- extern void (*_error)(id object, const char *fmt, va_list ap);
-
- now my question; what is wrong with objc.h ? how can i fix the error ?
-
- The source :
- ---------------------------- Int.m -------------------------------------
- #import <stdio.h>
- #import <objc/Object.h>
- #import "Int.h"
-
- @implementation Int: Object // Int is derived from Object
-
- + makeRoomFor: (int) i
- {
- id anInstance;
-
- anInstance = [super new];
- value = i;
- return anInstance;
- }
-
- - report
- {
- printf("%4d", value);
- return self;
- }
-
- @end
-
- ---------------------------- Int.h -------------------------------------
- @interface Int: Object // Int is derived from Object
- {
- int value; // This is the data portion. Like a struct.
- }
- + makeRoomFor: (int) i;
- - report;
-
- @end
- ------------------------------------------------------------------------
-
- thanks for helping - flo.
-
- --
- 2i-d&s : wolpert%dandsnx.uucp@germany.eu.net (NeXTmail preferred)
- Hellige : wolpert%ppgfr.uucp@germany.eu.net
- uni-fr : wolpert@informatik.uni-freiburg.de
- snail-mail to 2i Industrial Informatics, Haierweg 20e, D-7800 Freiburg
-