I have a .lib file, source code of which I don’t have.
I need an exported function from it, but I’m writing in C, and the function is C++ name-mangled. I can’t write extern "C", because I don’t have the source code.
How do I link mangled function without source code and switching to C++?
Make C++ wrapper:
wrapper.cpp:
consumer.c:
Build: (e.g. with GCC)