Re: link order
Re: link order
- Subject: Re: link order
- From: Jack Repenning <email@hidden>
- Date: Fri, 3 Aug 2007 18:58:25 -0700
On Aug 3, 2007, at 6:42 PM, Kyle Sluder wrote:
Why not do something like the following in a prefix header:
#ifndef FunctionYouAreReplacing
#define FunctionYouAreReplacing MyReplacementFunction
#define ReplacedFunction FunctionYouAreReplacing
#endif
Does that actually work? Those are macros, seems like you might get
an expansion loop...
And then have your version (MyReplacedFunction) call ReplacedFunction
(which the preprocessor will replace with the appropriate call).
Take note, however, that no matter your best efforts, the library you
are linking against will always use the original function internally,
never your replaced version.
... and any other code you can't recompile using your fancy macros.
Nowhere in this thread do you mention what language you're working
in. If it's Objective-C, there are techniques for doing things not
unlike what you want, including
- Class Categories
- poseAs
- Method Swizzling
Not that any of these is without its potential surprises ....
-==-
Jack Repenning
Chief Technology Officer
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
office: +1 650.228.2562
mobile: +1 408.835.8090
raindance: +1 877.326.2337, x844.7461
aim: jackrepenning
skype: jrepenning
_______________________________________________
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