• 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: Objective-C Unit Testing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C Unit Testing


  • Subject: Re: Objective-C Unit Testing
  • From: Chris Suter <email@hidden>
  • Date: Tue, 30 Mar 2010 11:23:27 +1100

On Tue, Mar 30, 2010 at 10:36 AM, Chris Hanson <email@hidden> wrote:

> You’ll need to add a build setting to your app target to have its symbols not hidden by default.  In the 64-bit runtime, each Objective-C class generates a symbol that users of the class link against; these aren’t exported by default for executables like they are for libraries.
>
> Another option is to add a .exp file for your app to declare explicitly what classes you wish to expose to those that link against it.  You can specify this file in the appropriate build setting and the linker will use it to determine which class symbols to hide and which to expose.

Alternatively (and this is admittedly brittle), you can add this to
the *end* of the files where you want the class symbol to be exposed:

#pragma GCC visibility push(default)

I haven't checked whether clang supports this but it works fine for GCC.

-- Chris
 _______________________________________________
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: 
 >Objective-C Unit Testing (From: Seth Willits <email@hidden>)
 >Re: Objective-C Unit Testing (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Objective-C Unit Testing
  • Next by Date: Re: using xcode ,how to compile .c file as .m file?
  • Previous by thread: Re: Objective-C Unit Testing
  • Next by thread: Re: Objective-C Unit Testing *Solved?*
  • Index(es):
    • Date
    • Thread