You're going to have to wrap the functions you need in other C++ functions, and have those functions have extern "C" linkage. You're also going to have to have C data structures that hold the stuff you will need to create the C++ classes. Call the wrapper functions from C.
E.g., if you have a cpp function like this:
int im_a_cxx_function(int , some_type, another_type &);
You make a wrapper function :
extern "C" int im_a_cxx_wrapper_function(int i,
struct some_C_type *st_C,
struct another_C_type *at_C)
{
some_type st;
another_type at;
set_some_type(&st, st_C);
set_another_type(&at, at_C);
return im_a_cxx_function(i, st, at);
}
Then, in the header for your wrapper functions:
#ifdef __cplusplus
extern "C" {
#endif
int im_a_cxx_wrapper_function(int i, struct some_C_type *st_C,
struct another_C_type *at_C);
#ifdef __cplusplus
}
#endif
Then, you include the header for your wrapper functions in your .c file, and call the the wrapper function normally. The main this is that you can't call a function without extern "C" from C due to name mangling, and since you aren't in control of the library functions, you have to wrap them up. You can also hold opaque pointers to C++ types, but since you can't use constructors, you'll generally have to at least write factory and delete functions for them.