In a C program I need to get a reference to a function located in a library written in C++.
Here is the part of the code
// Some C includes
#include <cpplib.h>
.
.
.
// A C structure attribute pointing to the C++ function
infoptr.EXT_meshAdapt = &meshAdapt;
The problem is the compiler tell me there is a undefined reference to meshAdapt
, while when I do the same with a C library there is no problems.
In this thread I saw we can call a C++ function in C by making a wrapper. But is there a way to refer a C++ function without making a wrapper ?