C/C++ shared lib linking prob

I’m a user of the Momentics IDE. Is it normal that C apps can’t link against C++ shared libs, and vice versa? I can’t find a way to make it work.

I think you can generally link C libs to a C++ prog, but not C++ libs to C apps, as there is stuff in C++ that simply does not exist in C so you won’t be able to use the functions anyway. Don’t quote me though!


The only way you can link against a C++ lib with a C app is if your C app only calls functions in the C++ library that are declared…

extern “C”

…otherwise the naming conventions won’t match.