I have a static lib libTheLib.a
(compiled by someone else). I am trying to link it with my program. One of the functions that this lib requires for linking is GetName
. I have a function void GetName(char*, int)
in my project, but the linker is still complaining the the symbol is not found. I am guessing that maybe the lib is looking for a function with a different signature. I tried using nm
hoping it will reveal what exactly is being looked for, but all it says is
U _GetName
which is not very helpful. Is there another way to find the signature of the symbol it is looking for? Or is the signature not part of the symbol, and it can actually link to any symbol of that name?
The lib is written in C
, my program in C++
, but the function is declared as
extern "C" GetName(char* c, int i) {...}
Also, this is using clang
, not gcc
, if it makes a difference (using XCode)