Integration with C++
Integration with C++ can be assumed as the easiest. C++ can be thought of as an object-oriented extension to C. A C++ compiler produces similar object files to those that a C compiler produces. Therefore, a C++ program can load and use a C shared object library easier than any other programming language. In other words, it doesn't matter whether a shared object file is the output of a C or C++ project; both can be consumed by a C++ program. The only thing that can be problematic in some cases is the C++ name mangling feature that is described in Chapter 2, Compilation and Linking. As a reminder, we'll briefly review it in the following section.
Name mangling in C++
To elaborate more on this, we should say that symbol names corresponding to functions (both global and member functions in classes) are mangled in C++. Name mangling is mainly there to support namespaces and function overloading, which are missing in C. Name mangling is enabled by default...