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

  1. Path: sparky!uunet!rosie!next.com
  2. From: jdoenias@next.com (Josh Doenias)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: appkit errors in header files
  5. Message-ID: <5867@rosie.NeXT.COM>
  6. Date: 13 Nov 92 20:14:35 GMT
  7. References: <1992Nov11.161902.60706@cc.usu.edu>
  8. Sender: news@NeXT.COM
  9. Lines: 32
  10.  
  11. In article <1992Nov11.161902.60706@cc.usu.edu> edx@cc.usu.edu writes:
  12. >
  13. >Has anyone else had trouble with the
  14. >appkit include files that use protocols?
  15. >I've got an application that includes
  16. >/NextDeveloper/Headers/appkit/drag.h and
  17. >it's giving me these errors:
  18. >
  19. >tumbleweed# make tst
  20. >cc   tst.c  -o tst
  21. >/NextDeveloper/Headers/appkit/drag.h:47: illegal keyword selector,  
  22. missing `)'
  23. ..
  24. >
  25. >What gives?  Any ideas?
  26.  
  27. What's happening here is that you've got Objective-C syntax in a regular C  
  28. code file, so the compiler is complaining.
  29. There are two possible solutions.
  30. 1.  rename your file tst.c to tst.m  -- the ".m" extension  tells the  
  31. compiler that you will be compiling Objective-C code.  The ".c" extension  
  32. says that the file just contains C.
  33.  
  34. - OR -
  35.  
  36. 2.  Compile with a "-ObjC" flag.  This explicitly tells the compiler to  
  37. expect Objective C syntax in the file.
  38.     > cc -ObjC tst.c -o tst
  39.  
  40.  
  41. -- josh
  42.  
  43.