• 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: Understanding Xcode build errors from using Objective-C runtime function in OS X's Foundation app template.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding Xcode build errors from using Objective-C runtime function in OS X's Foundation app template.


  • Subject: Re: Understanding Xcode build errors from using Objective-C runtime function in OS X's Foundation app template.
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 30 May 2013 11:44:42 -0700

On May 30, 2013, at 10:25 AM, Public <email@hidden> wrote:

> Turns out the 19 build errors stemmed from my forgetting that Xcode expecting a .m to use Foundation even though I was using a C function int objc_getClassList(Class *buffer, int bufferLen)

Well, you were trying to include/parse an Objective-C header (Foundation.h) in a pure C source file, which means the compiler will barf on all the Objective-C syntax.

Since Obj-C is a superset of C, it’s best to just use a .m suffix in all your source files if you use any Obj-C in your app.

—Jens
 _______________________________________________
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: 
 >Re: Understanding Xcode build errors from using Objective-C runtime function in OS X's Foundation app template. (From: Chris in Public <email@hidden>)
 >Re: Understanding Xcode build errors from using Objective-C runtime function in OS X's Foundation app template. (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: Debugging a CALayer Bad Access
  • Next by Date: Re: SenTestCase link error but framework clearly linked
  • Previous by thread: Re: Understanding Xcode build errors from using Objective-C runtime function in OS X's Foundation app template.
  • Next by thread: Understanding Xcode build errors from using Objective-C runtime function in OS X's Foundation app template.
  • Index(es):
    • Date
    • Thread