Forum Topic - Link time wrapping using QCC:
   
Link time wrapping using QCC  
Hi folks,

I would like to use link time wrapping so I tried linking a program using QCC with the following option 
              --wrap foo  

This does not work. How should I proceed to wrap functions in my program ?
Thanks in advance,

Wim
Re: Link time wrapping using QCC  
On 10-06-15 08:25 AM, Wim Hellenthal wrote:
> Hi folks,
>
> I would like to use link time wrapping so I tried linking a program using QCC with the following option
>                --wrap foo
>
> This does not work. How should I proceed to wrap functions in my program ?
> Thanks in advance,

It's a linker option so you have to pass it through to the linker using 
-Wl, For example:

-Wl,--wrap,foo

Regards,

Ryan Mansfield
Re: Link time wrapping using QCC  
Thank for the reply.

Linking did continue  but resulted  in the  unresolved symbol

                          undefined reference to `__real_foo()'


I got ride of it using extern "C" linkage 

Do the wrapped functions alway require C linkage ?

Regards
Wim