all.
I want to link a library which calls malloc() function. However, my target environment is different one and malloc() is supplied as in
malloc()
What about:
#define malloc my_malloc #include #undef malloc int malloc(size_t sz) { return my_malloc(sz); } #define malloc my_malloc // use your malloc here