I have a bunch of macros defined in a library for example called MY_LIB.so I built and compiled it successfully. Example:
#define DOSOMETHING() function()
#define ANOTHER() function2()
When I use it in another project, I linked it in my Makefile using -lMY_LIB and I am getting an undefined reference error to function(). I click on it and it brings me to DOSOMETHING() macro. How do I get around with linker errors from macros?
Macrois nothing more than just a copy of it content to code. Thelinkersais thatfunctionis not implemented. So just provide an implentation