• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: adding Foundation framework to a Carbon application SOLVED
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding Foundation framework to a Carbon application SOLVED


  • Subject: Re: adding Foundation framework to a Carbon application SOLVED
  • From: Donald Hall <email@hidden>
  • Date: Sat, 19 Nov 2005 23:25:44 -0700

Thanks for all the replies and interesting discussion. I should have realized my problem.

Not only did I have to change the source code type in the Get Info popup, but I had to change the file extension to .m as well.

Don

At 11:44:46 -0800 2005/11/19, Ed Voas wrote:
Ugh. Bad answer. No cookie. :-P Renaming files to appease the compiler sucks as you might lose all your cvs history, etc. (of course, if you use Perforce, it's not as much of an issue, but it
does mean you have to 'integrate' to create a new file).


There's actually a popup in the info window if you get info on the file you want to include your obj-c stuff in. Just select the "sourcecode.cpp.objcpp" or "sourcecode.c.objc" option.

On Nov 19, 2005, at 9:45 AM, Chris Parker wrote:

 ...or just rename the .c file to a .m file. :)

 .chris


 Daniel

 On Nov 19, 2005, at 1:26 AM, Donald Hall wrote:


I have a small carbon application that I had working fine. I wanted to add some code that uses Foundation classes (NSAppleScript and NSString), so added the Foundation framework to my project. Upon compiling all hell broke loose - over 1500 errors, all related to the '#import <Foundation/Foundation.h>' statement.

 Here is a typical error message:

 error: syntax error at '@' token

 They all seem to have to do with the fact that Foundation is Obj-C.

 I have several Foundation apps that include Carbon without problems.

Is there something special I have to do to the project to get it to work?

 Thanks,

Don

-- Donald S. Hall, Ph.D. Apps & More Software Design, Inc. email@hidden http://www.appsandmore.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: Modal dialog weirdness
  • Next by Date: Cocoa framework for iSight?
  • Previous by thread: Newbie: Drag of Custom Type from NSOutlineView
  • Next by thread: Cocoa framework for iSight?
  • Index(es):
    • Date
    • Thread