Hi All,
I have a question that I cannot figure out.
I have DLL that will export class and some C functions.
Should I enclose both definition (.cpp) and Implementation(.h) with extern C? something like below?
myfunc.h
class TestClass{
//some stuffs here
};
extern "C" {
void myFunc(int x, int y);
void myFunc2(int a, int b);
}
myfunc.cpp
//class implementation here
extern "C" {
void myFunc(int x, int y){
//some stuff
}
void myFunc2(int a, int b){
//more stuffs
}
}
Thanks!