S
salkesh
Hi,
I have got a C++ code which has a namespace definition and some
functions in it -
namespace A {
int func1();
int func2();
}
now i want to access this functions from another function which has "C"
linkage...
how can i do this...?
currently i am doin it in this way but it is giving error -
in a .h file i have defined a function as -
extern "C" int cfunc();
and the in the definition in the corresponding c++ file -
int cfunc()
{
int x = A::func1();
}
and i am compiling this with a g++ compiler to create a shared library
which is loaded in another C code ;-)
plz reply asap... need this urgently...
thnx a lot...
....
alkesh
I have got a C++ code which has a namespace definition and some
functions in it -
namespace A {
int func1();
int func2();
}
now i want to access this functions from another function which has "C"
linkage...
how can i do this...?
currently i am doin it in this way but it is giving error -
in a .h file i have defined a function as -
extern "C" int cfunc();
and the in the definition in the corresponding c++ file -
int cfunc()
{
int x = A::func1();
}
and i am compiling this with a g++ compiler to create a shared library
which is loaded in another C code ;-)
plz reply asap... need this urgently...
thnx a lot...
....
alkesh