I want to have a plugin with a simpler name to solve in another C ++ code.
class B {
};
extern "C" B foo();
And in another part of the program (which is also in C ++ and has the same class B definition with the plugin):
B (*func)();
func = dlsym("/path/to/so", "foo");
B m = func();
Will such code cause any problems, that is, it is allowed (by standard) to use the C ++ class as a parameter or return type in a function extern "C"? This seems to work on my gcc, but what about the others?
source
share