I have a static library which contains object files, I want to wrap a function which is called in one object file and is defined in another object file, I am trying to use the method suggested in Override a function call in C using the gcc --wrap option.
Suppose I want to override a function getnamei(), I created a wrap.C file and defined __wrap__getnamei(), then compiled it to get an object file, then using the --wrap option I am able to override the function, but when I try to call the real function with __real__getnamei() in wrap.C, I get "error: '__real__getnamei() was not declared in this scope' ".
I am running on Windows 7, using MinGW