home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / gcc / help / 3033 < prev    next >
Encoding:
Text File  |  1993-01-26  |  1.9 KB  |  75 lines

  1. Xref: sparky gnu.gcc.help:3033 de.comp.gnu:332
  2. Newsgroups: gnu.gcc.help,de.comp.gnu
  3. Path: sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!Germany.EU.net!ppgfr!mars!wolpert
  4. From: wolpert@mars (Florian Wolpert)
  5. Subject: objc.h broken ?
  6. Message-ID: <1993Jan26.091448.16939@ppgfr.uucp>
  7. Sender: news@ppgfr.uucp
  8. Nntp-Posting-Host: mars
  9. Organization: PPG Hellige GmbH, Freiburg, GERMANY
  10. X-Newsreader: Tin 1.1 PL4
  11. Date: Tue, 26 Jan 1993 09:14:48 GMT
  12. Lines: 61
  13.  
  14. Hi ObjC-users,
  15.  
  16. i have just installed gcc 2.3.2 with the objc-frontend and tried to compile
  17. (not even link) a short example objc-file. But following happens:
  18.  
  19. prompt> gcc -I/src/gnu/gcc-2.3.2 Int.m -c
  20. ..
  21. [warning about #import deleted]
  22. ..
  23. In file included from /src/gnu/gcc-2.3.2/objc/Object.h:29, from Int.m:2:
  24. /src/gnu/gcc-2.3.2/objc/objc.h:346: parse error before `va_list'
  25. prompt>
  26.  
  27. The line 346 in objc.h looks like this:
  28. extern void (*_error)(id object, const char *fmt, va_list ap);
  29.  
  30. now my question; what is wrong with objc.h ? how can i fix the error ?
  31.  
  32. The source :
  33. ---------------------------- Int.m -------------------------------------
  34. #import <stdio.h>
  35. #import <objc/Object.h>
  36. #import "Int.h"
  37.  
  38. @implementation Int: Object     // Int is derived from Object
  39.  
  40. + makeRoomFor: (int) i
  41. {
  42.   id  anInstance;
  43.  
  44.   anInstance  = [super new];
  45.   value = i;
  46.   return anInstance;
  47. }
  48.  
  49. - report
  50. {
  51.   printf("%4d", value);
  52.   return self;
  53. }
  54.  
  55. @end
  56.  
  57. ---------------------------- Int.h -------------------------------------
  58. @interface Int: Object     // Int is derived from Object
  59. {
  60.     int value;          // This is the data portion.  Like a struct.
  61. }
  62. + makeRoomFor: (int) i;
  63. - report;
  64.  
  65. @end
  66. ------------------------------------------------------------------------
  67.  
  68. thanks for helping - flo.
  69.  
  70. --
  71. 2i-d&s : wolpert%dandsnx.uucp@germany.eu.net (NeXTmail preferred)
  72. Hellige : wolpert%ppgfr.uucp@germany.eu.net
  73. uni-fr  : wolpert@informatik.uni-freiburg.de
  74. snail-mail to 2i Industrial Informatics, Haierweg 20e, D-7800 Freiburg
  75.