🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1606

Re: appkit errors in header files

#1606
From: Josh Doenias
Date: Fri, 13 Nov 1992 20:14
31 lines
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
Technical Details
Message-ID: <5867@rosie.NeXT.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!rosie!next.com
References: <1992Nov11.161902.60706@cc.usu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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