Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #7049

Re: call member function without object-compile error

From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c++
Subject Re: call member function without object-compile error
Date 2011-06-22 16:43 +1200
Message-ID <96da80FmtvU6@mid.individual.net> (permalink)
References <26f1f45a-7441-411a-942d-d4e70b853922@j14g2000prn.googlegroups.com> <96d4tjFmtvU4@mid.individual.net> <39a31ad8-bfa6-4cf7-a9e0-64192fdb9cdb@h12g2000pro.googlegroups.com> <96d7euFmtvU5@mid.individual.net> <42f86cc8-4dd9-4f22-af17-6751e176485d@r27g2000prr.googlegroups.com>

Show all headers | View raw


On 06/22/11 04:36 PM, eric wrote:
> -------------------------
> my g++ reponse linker error
> --------------
> eric@eric-laptop:~/CppPrimer3$ g++ p904.cpp
> /tmp/ccBLCYgi.o: In function `NameQuery::NameQuery()':
> p904.cpp:(.text._ZN9NameQueryC2Ev[_ZN9NameQueryC5Ev]+0xe): undefined
> reference to `Query::Query()'
> p904.cpp:(.text._ZN9NameQueryC2Ev[_ZN9NameQueryC5Ev]+0x17): undefined
> reference to `vtable for NameQuery'
> /tmp/ccBLCYgi.o: In function `NameQuery::~NameQuery()':
> p904.cpp:(.text._ZN9NameQueryD2Ev[_ZN9NameQueryD5Ev]+0xc): undefined
> reference to `vtable for NameQuery'
> collect2: ld returned 1 exit status
> eric@eric-laptop:~/CppPrimer3$
> ----------------------------------
> Need any advancer's suggestion and help again, and thanks a lot in
> advance, Eric

Your base class default constructor and virtual method don't have bodies.

-- 
Ian Collins

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

call member function without object-compile error eric <cneric12lin0@gmail.com> - 2011-06-21 20:01 -0700
  Re: call member function without object-compile error Ian Collins <ian-news@hotmail.com> - 2011-06-22 15:12 +1200
    Re: call member function without object-compile error eric <cneric12lin0@gmail.com> - 2011-06-21 20:28 -0700
      Re: call member function without object-compile error Ian Collins <ian-news@hotmail.com> - 2011-06-22 15:55 +1200
        Re: call member function without object-compile error eric <cneric12lin0@gmail.com> - 2011-06-21 21:36 -0700
          Re: call member function without object-compile error Ian Collins <ian-news@hotmail.com> - 2011-06-22 16:43 +1200
            Re: call member function without object-compile error eric <cneric12lin0@gmail.com> - 2011-06-21 21:54 -0700

csiph-web