• 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: Framework development and Garbage collection required option?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Framework development and Garbage collection required option?


  • Subject: Re: Framework development and Garbage collection required option?
  • From: Bill Bumgarner <email@hidden>
  • Date: Wed, 12 Dec 2007 17:02:50 -0800

On Dec 12, 2007, at 1:37 PM, Brad Barclay wrote:
It may also be some sort of bug in the Xcode 3.0 template for a Cocoa Framework (which I should have mentioned is what I started from, without any changes other than to the Garbage Collection option). Editing the target properties directly, I found that both the main Framework target's and the Unit Testing target's Debug/ Release configurations had the "Prefix Header" (GCC_PREFIX_HEADER) property set (the main Framework build target had it set to the Framework being built, and the Unit Test had it set to "$ (SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h").

Removing these and leaving the field blank allows the build with "Garbage Collection: Required" set to complete correctly. However, I am concerned that there is an Xcode related issue, as leaving these set and merely changing the Garbage Collection setting to "Supported" allows them to build just fine.

That sounds like a bug. If you have a fairly minimal example based on the Cocoa framework project template, please file a bug and attach a ZIP of your project.


Have you tried setting the prefix header to the same value in both targets?

If your application and GC'd unit tests are the only ones that will use the framework, you can safely build with "gc supported" and ignore all retain/release/autorelease calls. It'll leak like a sieve if ever used in non-GC, of course.

Not an issue, fortunately. So now I'm to the point where I can get it to build with Garbage Collection set to Required, however now the Unit Test rig tool crashes with no explanation:


/Developer/Tools/RunUnitTests:314: error: Test rig '/Developer/Tools/ otest' exited abnormally with code 5 (it may have crashed).

The archives of this list contains instruction on how to address this issue; IIRC, it is because otest is built non-GC. You just need to build a little bootstrap target to fire up your unit tests. Not hard.


I'm not quite sure if removing the "Prefix Header" for the Framework build is a good idea or not, but at least it allows me to build with Garbage Collection set to Required. I'm going to have to do some further investigation against the test rig tool crashing on me -- I think I'm almost to the point where I'm just going to create a brand-new Xcode project and just copy the sources over (in the event I accidentally modified a setting somewhere somehow).

Thanks again for your input. I've only worked on a small number of ObjC/Cocoa projects, so some of these issues and their related settings are a bit new to me.

The prefix header -- the precompiled header -- can greatly accelerate compilation as your project grows. It also simplifies imports, if you choose to use it this way, in that you can put all of your #imports into the prefix header and can even eliminate all #imports from your sources.


The build settings stuff can be a bit overwhelming. I typically find it useful to look at the full verbose build log to see if all the options I expect are being (or are not being) passed to the compiler/ linker. If so / if not, you can then use the search field to poke around for where it might be set, etc...

b.bum



_______________________________________________
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: 
 >Framework development and Garbage collection required option? (From: Brad Barclay <email@hidden>)
 >Re: Framework development and Garbage collection required option? (From: Bill Bumgarner <email@hidden>)
 >Re: Framework development and Garbage collection required option? (From: Brad Barclay <email@hidden>)

  • Prev by Date: Re: documentation window and "Previous"
  • Next by Date: Debugger & Data Formatters
  • Previous by thread: Re: Framework development and Garbage collection required option?
  • Next by thread: How to add classes in Xcode 3.0
  • Index(es):
    • Date
    • Thread