Re: including xibs from another project
Re: including xibs from another project
- Subject: Re: including xibs from another project
- From: Jocelyn Houle <email@hidden>
- Date: Tue, 19 Jan 2010 12:43:11 -0500
> See -all_load and -ObjC gcc man pages.
I've been hit by Roland's issue myself, and have opted to add bogus code to force the class' existence at link time.
My option was to add a bogus (empty) function:
+ (void)_keepAtLinkTime
which I call once somewhere in my code (my point is there no need to allocate anything).
I only have to do this for classes that are only known by the NIB file (quite rare), but I always found it unclean to have code to circumvent an aggressive linker.
Looking at a few threads passing by, it sounds like I might be able to fix it by sending a linker option...
Here is my understanding:
-all_load: This one seems a bit overkill, as all of my unused classes will be kept in the final binary, potentially bloating it.
-ObjC : This seems to be a compiler flag, and overrides the file extension rules.
But the following page:
http://developer.apple.com/mac/library/documentation/DeveloperTools/gcc-4.0.1/gcc/Link-Options.html
mentions the following:
===
-lobjc
You need this special case of the -l option in order to link an Objective-C or Objective-C++ program.
===
which sounds a bit undocumented as to what exact functionality it provides (compared to -all_load, for instance), but might be just what I need.
Now, I tried finding this setting in Xcode's target settings, but I couldn't find it.
Can somebody enlighten me?... _______________________________________________
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