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

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


  • Subject: Re: NSObjCRuntime.h won't compile? Or .mm files?
  • From: Dave McCaldon <email@hidden>
  • Date: Wed, 21 Sep 2005 19:39:56 -0400


If you go Get Info on the file, in the General tab, what's the file type marked as?

It should be sourcecode.cpp.objcpp

As for the preprocess mode, it doesn't actually compile it, it's just running it through the preprocessor (see gcc -E), it's a very handy feature of Xcode to be able to do that.  You can just close the .i window with Shift-Cmd-W and it goes away.


On Sep 21, 2005, at 7:23 PM, Bob Sabiston wrote:


On Sep 21, 2005, at 5:58 PM, Dave McCaldon wrote:


I thought Steve Jobs said it would be easy :-)

Try this:

    * In Xcode, right click on the .mm filename in the project outline view
    * Choose Preprocess

Now, take a look at what is at the beginning of the preprocessor output, it might help you identify what the problem is.


Wow, that is a lot of stuff that appears there.  At any rate, I can't tell that anything goes wrong.  Here is the section of text in the preprocess immediately before the @class NSString that it gives an error.  It basically runs through a lot of header files specified  by Cocoa.h.  When I do the preprocess, it doesn't report any errors, is that the way it is supposed to work?

Thanks for any more advice,
Bob

extern "C" void objc_collect_if_needed(unsigned long options);
extern "C" unsigned int objc_numberAllocated(void);
extern "C" BOOL objc_collecting_enabled(void);


extern "C" id objc_allocate_object(Class cls, int extra);


extern "C" id objc_assign_strongCast(id val, id *dest);
extern "C" id objc_assign_global(id val, id *dest);
extern "C" id objc_assign_ivar(id value, id dest, unsigned int offset);
extern "C" void *objc_memmove_collectable(void *dst, const void *src, size_t size);


extern "C" BOOL objc_is_finalized(void *ptr);
# 11 "/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h" 2 3

# 1 "/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h" 1 3
# 46 "/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h" 3
extern "C" double NSFoundationVersionNumber;
# 56 "/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h" 3
@class NSString;


 _______________________________________________
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

References: 
 >NSObjCRuntime.h won't compile? Or .mm files? (From: Bob Sabiston <email@hidden>)
 >Re: NSObjCRuntime.h won't compile? Or .mm files? (From: Dave McCaldon <email@hidden>)
 >Re: NSObjCRuntime.h won't compile? Or .mm files? (From: Bob Sabiston <email@hidden>)

  • Prev by Date: Re: Using AppleScript to access a Copy File Phase in an Xcode project
  • Next by Date: Re: why can't you initialize variable in case statements
  • Previous by thread: Re: NSObjCRuntime.h won't compile? Or .mm files?
  • Next by thread: Re: NSObjCRuntime.h won't compile? Or .mm files?
  • Index(es):
    • Date
    • Thread