I am having difficulties to call a function in a component from another component. Is it possible to call function in a component from another component? i have use static, extern, pointer call but all getting the same error.
I am able to call the component in project main files but when i call from other component i am getting :
Code: Select all
undefined reference to B::init(). in function `A::init()'
component A.h:
Code: Select all
class A
{
public:
A(){};
static init();
}
Code: Select all
class B
{
B(){};
static init();
}
Code: Select all
B b;
init(){
b.init(); // error
or
B::init(); // error
}
Thank you.