Re: link order
Re: link order
- Subject: Re: link order
- From: "Kyle Sluder" <email@hidden>
- Date: Fri, 3 Aug 2007 21:42:50 -0400
Why not do something like the following in a prefix header:
#ifndef FunctionYouAreReplacing
#define FunctionYouAreReplacing MyReplacementFunction
#define ReplacedFunction FunctionYouAreReplacing
#endif
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.
--Kyle Sluder
On 8/3/07, Chris Espinosa <email@hidden> wrote:
>
>
> On Aug 3, 2007, at 2:27 PM, email@hidden wrote:
>
>
> I need to replace a fonction in library. This new fonction is defined in my
> source, but is never called.
>
> How can I control te link order between a source file and a librarie. In
> CodeWarrior it works fine.
> You can't control the order of linkage between compiled object files and
> link libraries in Xcode. You can control the link order among the sources
> you build (by rearranging them in the Compile Sources build phase), but you
> can only change sources relative to other sources and libraries relative to
> other libraries.
>
> You might want to set one of the linker directives to make duplicate symbols
> a warning, not an error.
>
> What you are attempting to do, however, is in violation of the standard, and
> your results will not be portable.
>
> 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
>
_______________________________________________
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