I was given a static library compiled by MinGW64, whose has an extension .a but not the regular .lib I'm familiar with. No further information was provided other than the API document. How could I check if it use STDCALL or CDECL calling convention?
Quote from: opaque on March 29, 2020, 05:24:57 amI was given a static library compiled by MinGW64, whose has an extension .a but not the regular .lib I'm familiar with. No further information was provided other than the API document. How could I check if it use STDCALL or CDECL calling convention?Use objdump -t <that .a>. If the symbols have @<some integer> suffix, it's stdcall. Otherwise, assume cdecl (if there's no other possibilities).Reference: https://en.wikipedia.org/wiki/Name_mangling
If it's a 64-bit library then it doesn't matter as on x86_64 there is no difference between calling conventions (they only differ by platform, namely Win64 vs. everyone else).
Quote from: PascalDragon on March 29, 2020, 01:03:40 pmIf it's a 64-bit library then it doesn't matter as on x86_64 there is no difference between calling conventions (they only differ by platform, namely Win64 vs. everyone else).Well, vectorcall is different.