Thread View: comp.sys.next.programmer
4 messages
4 total messages
Started by edx
Wed, 11 Nov 1992 22:19
appkit errors in header files
Author: edx
Date: Wed, 11 Nov 1992 22:19
Date: Wed, 11 Nov 1992 22:19
28 lines
1195 bytes
1195 bytes
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 `)' after `id' /NextDeveloper/Headers/appkit/drag.h:48: illegal keyword selector, missing `)' after `id' /NextDeveloper/Headers/appkit/drag.h:49: illegal keyword selector, missing `)' after `id' /NextDeveloper/Headers/appkit/drag.h:50: illegal keyword selector, missing `)' after `id' /NextDeveloper/Headers/appkit/drag.h:51: illegal keyword selector, missing `)' after `id' /NextDeveloper/Headers/appkit/drag.h:52: illegal keyword selector, missing `)' after `id' *** Exit 1 Stop. Each of these lines in the header file identifies a protocol method. What gives? Any ideas?
Re: appkit errors in header files
Author: Daryll J. Strauss
Date: Thu, 12 Nov 1992 01:39
Date: Thu, 12 Nov 1992 01:39
21 lines
1240 bytes
1240 bytes
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 `)' >after `id' > <<< Lots more deleted >>> The problem is that your filename ends in ".c", not ".m". The compiler looks at that and says "This is C code, not Objective-C code" and complains when it hits something that is Objective-C specific. The two solutions are to either use ".m" as your extension or to compile with the -ObjC switch. (Which also tells the compiler to treat the file as Objective-C) Either technique will work.
Re: appkit errors in header files
Author: Alex Blakemore
Date: Thu, 12 Nov 1992 18:51
Date: Thu, 12 Nov 1992 18:51
14 lines
907 bytes
907 bytes
In article <1992Nov11.161902.60706@cc.usu.edu> edx@cc.usu.edu writes: > [including] /NextDeveloper/Headers/appkit/drag.h [is] giving me these errors: > cc tst.c -o tst > /NextDeveloper/Headers/appkit/drag.h:47: illegal keyword selector, missing `)' mv tst.c tst.m # should fix it you can also change some CFLAG in your Makefile preamble but I forgot what its called. -- --------------------------------------------------- Alex Blakemore alex@cs.umd.edu NeXT mail accepted
Re: appkit errors in header files
Author: Josh Doenias
Date: Fri, 13 Nov 1992 20:14
Date: Fri, 13 Nov 1992 20:14
31 lines
1253 bytes
1253 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads