G
g35rider
Hi,
I am trying to understand from C++ point of view what the problem
is.
I have a file called.
Controllers.h in which I have a base class Controller and couple of
other sub classes AController and BController. Now I have given the
implementation of Controller constructor in Controller.h, but have
written 2 seperate cpp files for AController and BController. Now I
make a library out of the 2 cpp files called libController.a
I have a apps directory where I use AController and BController without
instansiating Controller anywhere, but when I compile, its ok, but when
I link with libController.a I get that linking error for undefined
vtable reference to Controller?
Should I made the Controller also in another cpp file, but I dont have
much code in it, its only a line, so thought it would be ok to put it
in the header file.
Thanks
Ankur
I am trying to understand from C++ point of view what the problem
is.
I have a file called.
Controllers.h in which I have a base class Controller and couple of
other sub classes AController and BController. Now I have given the
implementation of Controller constructor in Controller.h, but have
written 2 seperate cpp files for AController and BController. Now I
make a library out of the 2 cpp files called libController.a
I have a apps directory where I use AController and BController without
instansiating Controller anywhere, but when I compile, its ok, but when
I link with libController.a I get that linking error for undefined
vtable reference to Controller?
Should I made the Controller also in another cpp file, but I dont have
much code in it, its only a line, so thought it would be ok to put it
in the header file.
Thanks
Ankur