Thanks for your reply.
Yeah, this code doesnt use any standard libs, all functions were written as stand alone for a MCU.
To run the apps locally we want to be able to rebuild the source using std unix libs/calls etc...
I mean I can have a function in my own lib called getpid(), and all linking will be directed there... The issue is getting the linking inside the lib out to getpid()...
With the 2 files - is there a way to stop the linker searching for external symbols in its local dir 1st..?
I have getpid.c:
Code:
int getpidUnix(void);
getpid(){ return getpidUnix() }
I have getpidUnix.c
Code:
#include <unistd.h>
{ .... return getpid() //want to call to the std unix lib, not to getpid.o}
So is there any way I can undefine the getpid symbol or force the linker to look for getpid in the std libs before it looks at external symbol tables of the local object files in the project?
I guess in the original source I could #define getpid getpidTheirs and then in my lib have getpidTheirs() which basically does the transformations and returns the result of unistd getpid()...?
Cheers,
NW