• 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
NSObjCRuntime.h won't compile? Or .mm files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSObjCRuntime.h won't compile? Or .mm files?


  • Subject: NSObjCRuntime.h won't compile? Or .mm files?
  • From: Bob Sabiston <email@hidden>
  • Date: Wed, 21 Sep 2005 17:16:37 -0500

Hello again,

    Sorry for all the questions.  I keep thinking it is almost through.
Xcode is trying to compile a .mm file I have in my project, it is some CoreImage stuff that uses Objective C, but this is overall a C++ application.  In Codewarrior this compiles fine, but Xcode is not having it.
I get this error in NSObjCRuntime,h:

System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:56: error: expected unqualified-id before '@' token

Caused by the following from that header file: 

@class NSString;

I actually don't include that .h file--I assume it is part of the #import <Cocoa/Cocoa.h> at the beginning of my file:

#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4

#import <Cocoa/Cocoa.h> 
#import <QuartzCore/QuartzCore.h>

Is there some trick to getting a .mm Objective C file to compile in Xcode?

Thanks!
Bob



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSObjCRuntime.h won't compile? Or .mm files?
      • From: Eric Albert <email@hidden>
    • Re: NSObjCRuntime.h won't compile? Or .mm files?
      • From: Dave McCaldon <email@hidden>
  • Prev by Date: Re: Specifying Where The Build Product Should Be Placed
  • Next by Date: Re: NSObjCRuntime.h won't compile? Or .mm files?
  • Previous by thread: subclass variable not defined in scope? (also)
  • Next by thread: Re: NSObjCRuntime.h won't compile? Or .mm files?
  • Index(es):
    • Date
    • Thread