home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / next / programm / 7164 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  1.2 KB

  1. Path: sparky!uunet!hela.iti.org!usc!news.aero.org!strauss
  2. From: strauss@aero.org (Daryll J. Strauss)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: appkit errors in header files
  5. Date: 12 Nov 1992 01:39:03 GMT
  6. Organization: The Aerospace Corporation
  7. Lines: 21
  8. Message-ID: <1dscjnINNq55@news.aero.org>
  9. References: <1992Nov11.161902.60706@cc.usu.edu>
  10. NNTP-Posting-Host: armadillo.aero.org
  11.  
  12. In article <1992Nov11.161902.60706@cc.usu.edu> edx@cc.usu.edu writes:
  13. >
  14. >Has anyone else had trouble with the
  15. >appkit include files that use protocols?
  16. >I've got an application that includes
  17. >/NextDeveloper/Headers/appkit/drag.h and
  18. >it's giving me these errors:
  19. >
  20. >tumbleweed# make tst
  21. >cc   tst.c  -o tst
  22. >/NextDeveloper/Headers/appkit/drag.h:47: illegal keyword selector, missing `)'
  23. >after `id'
  24. > <<< Lots more deleted >>>
  25.  
  26. The problem is that your filename ends in ".c", not ".m". The compiler
  27. looks at that and says "This is C code, not Objective-C code" and
  28. complains when it hits something that is Objective-C specific.
  29.  
  30. The two solutions are to either use ".m" as your extension or to compile
  31. with the -ObjC switch. (Which also tells the compiler to treat the file
  32. as Objective-C) Either technique will work.
  33.