views:

22

answers:

1

I just implemented the Objective Flicker library for an iPhone app and after much testing set the target to Distribution and started getting the following error:

-fobjc-gc not supported for iPhone OS: ignoring

unfortunately it is not being ignored and the build fails. I have no clue as to where to begin to research what needs to be adjusted as this is at compile/link time and I have so far had no reason to delve into the intricacies involved. Any hints as to how to go about learning/fixing this issue would be greatly appreciated.

A: 

It looks like your library is using the garbage collection features of Objective-C 2.0. You will need to change that if you want it to work properly on the iPhone, where garbage collected Objective-C doesn't exist. From the man page:

-fobjc-gc Enable garbage collection (GC) in Objective-C and Objective-C++ programs. The resulting binary requires additional runtime support which is present on Mac OS X Version 10.5 (Leopard) and later. All Objective-C objects are presumed to be garbage collected. To aid in this effort, compiler implements assignments of Objective-C object pointers via runtime support functions. These functions work correctly in non-GC environments as well, in case this code is used as part of a library.

The comment at the end there about "non-GC" environments applies only to non-GC Mac OS X programs, not to iPhone applications.

Carl Norum
Thank you for the info. problem solved in 10 seconds following your resonse!!!
cameron