Getting linking error: not found in vtable (Trying to understand whats wrong the way I did my classe

Discussion in 'C++' started by g35rider@gmail.com, Aug 17, 2006.

  1. Guest

    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
    , Aug 17, 2006
    #1
    1. Advertising

  2. wrote:
    > [..] Now I
    > make a library out of the 2 cpp files called libController.a
    >
    > [..] when I link with libController.a I get that linking error for
    > undefined vtable reference to Controller?
    >


    This is beyond the scope of this newsgroup, unfortunately. We discuss
    the language, and the language does not define libraries or linking
    with them. You need to ask in the newsgroup that deals with your OS
    or your compiler.

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
    Victor Bazarov, Aug 17, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    43,006
    spatil02
    Jan 30, 2012
  2. Reg
    Replies:
    2
    Views:
    4,315
    acsimsek
    Jan 28, 2013
  3. Petr Janda
    Replies:
    2
    Views:
    100
    Rick DeNatale
    Aug 20, 2006
  4. francisco lopez
    Replies:
    2
    Views:
    165
    Dr John Stockton
    Dec 31, 2004
  5. Replies:
    2
    Views:
    210
    Barry Schwarz
    Jul 28, 2013
Loading...

Share This Page