c - Expected signature of external symbol in static lib -


i have static lib libthelib.a (compiled else). trying link program. 1 of functions lib requires linking getname. have function void getname(char*, int) in project, linker still complaining the symbol not found. guessing maybe lib looking function different signature. tried using nm hoping reveal being looked for, says is

         u _getname 

which not helpful. there way find signature of symbol looking for? or signature not part of symbol, , can link symbol of name?

the lib written in c, program in c++, function declared

extern "c" getname(char* c, int i) {...} 

also, using clang, not gcc, if makes difference (using xcode)

1) sure function name , signature correct?

2) why

extern "c" getname(char* c, int i) {...} 

instead of

extern "c" getname(char* c, int i); 

?


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -