home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!rosie!next.com
- From: jdoenias@next.com (Josh Doenias)
- Newsgroups: comp.sys.next.programmer
- Subject: Re: appkit errors in header files
- Message-ID: <5867@rosie.NeXT.COM>
- Date: 13 Nov 92 20:14:35 GMT
- References: <1992Nov11.161902.60706@cc.usu.edu>
- Sender: news@NeXT.COM
- Lines: 32
-
- In article <1992Nov11.161902.60706@cc.usu.edu> edx@cc.usu.edu writes:
- >
- >Has anyone else had trouble with the
- >appkit include files that use protocols?
- >I've got an application that includes
- >/NextDeveloper/Headers/appkit/drag.h and
- >it's giving me these errors:
- >
- >tumbleweed# make tst
- >cc tst.c -o tst
- >/NextDeveloper/Headers/appkit/drag.h:47: illegal keyword selector,
- missing `)'
- ..
- >
- >What gives? Any ideas?
-
- What's happening here is that you've got Objective-C syntax in a regular C
- code file, so the compiler is complaining.
- There are two possible solutions.
- 1. rename your file tst.c to tst.m -- the ".m" extension tells the
- compiler that you will be compiling Objective-C code. The ".c" extension
- says that the file just contains C.
-
- - OR -
-
- 2. Compile with a "-ObjC" flag. This explicitly tells the compiler to
- expect Objective C syntax in the file.
- > cc -ObjC tst.c -o tst
-
-
- -- josh
-
-