From https://stackoverflow.com/questions/1041866/what-is-the-effect-of-extern-c-in-c:
Since C++ has overloading of function names and C does not, the C++ compiler cannot just use the function name as a unique id to link to, so it mangles the name by adding information about the arguments. A C compiler does not need to mangle the name since you can not overload function names in C. When you state that a function has extern "C"
linkage in C++, the C++ compiler does not add argument/parameter type information to the name used for linkage.
extern "C" void foo(int); extern "C" { void g(char); int i; }