Calling C++ routines from C?

This is a discussion on Calling C++ routines from C? within the C Programming forums, part of the General Programming Boards category; Guys,
Please can anyone help me? I want to call C++ routines from my C code. 1: is this possible ...

Calling C++ routines from C?

Guys,
Please can anyone help me? I want to call C++ routines from my C code. 1: is this possible and 2: can anyone tell me how I can do it? I guess I'd need to call some kind of C++ wrapper for my C++ routines?

In simple cases, C and C++ use the same calling conventions. If the C++ has been compiled with a suitable compiler, the object should be callable from C. Where you may have some problems is if the C++ code uses some C++ specific features, function overloading for example, here the name of the C++ function becomes "decorated" to enable the C++ environment to resolve any ambiguity. "Decoration, (mangling), is not standard and hence will vary from compiler to compiler.