Compiler only creates object files. Object files only contain a name of the function and where to find it. C++ changes the name of the function to reflect the definition. Another object file may need a reference to thia function. Linker (or dynamic loader) tries to tie these object files together and to do that the names must much. If they're not mangled in both places, it'll successed. If they're mangled in one place, but not the other, it'll not succeed.
So, if you biuld everything with C++, it links against CPP libraries, everything is mangled everywhere, you're Ok.
If you build everything with C, it links agains C libraries, nothing is mangled, you're Ok.
If you get a C library, which is not mangled, and want to access from C++ code, the C function name is not mangled, but C++ name is. They won't link. Therefore, in this case, you need to tell C++ compiler to use the unmangled name.