Results 1 to 3 of 3

Thread: UNDEFINED REFERENCE TO vTable for BookList

  1. #1
    Join Date
    Jul 2012
    Posts
    201
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default UNDEFINED REFERENCE TO vTable for BookList

    I'm getting this error below. is it familiar to anyone?

    Running build steps for project Assignment1Q1...
    Configuration unchanged, skipping qmake step.
    Starting: "C:/Qt2/2010.04/mingw/bin/mingw32-make.exe" -w
    mingw32-make: Entering directory `C:/UNISA MODULES/COS3711/ASSIGNMENTS/Assignment1Q1-build-desktop'
    C:/Qt2/2010.04/mingw/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `C:/UNISA MODULES/COS3711/ASSIGNMENTS/Assignment1Q1-build-desktop'
    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\Qt2\2010.04\qt\include\QtCore" -I"..\..\..\..\Qt2\2010.04\qt\include\QtGui" -I"..\..\..\..\Qt2\2010.04\qt\include" -I"..\..\..\..\Qt2\2010.04\qt\include\ActiveQt" -I"debug" -I"..\Question1" -I"." -I"..\..\..\..\Qt2\2010.04\qt\mkspecs\win32-g++" -o debug\booklist.o ..\Question1\booklist.cpp
    ..\Question1\booklist.cpp: In member function 'QString BookList::toString()':
    ..\Question1\booklist.cpp:6: warning: no return statement in function returning non-void
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -mthreads -Wl -o debug\Assignment1Q1.exe debug/main.o debug/book.o debug/bookinput.o debug/bookwriter.o debug/booklist.o debug/moc_book.o debug/moc_bookinput.o debug/moc_bookwriter.o -L"c:\Qt2\2010.04\qt\lib" -lQtGuid4 -lQtCored4
    mingw32-make[1]: Leaving directory `C:/UNISA MODULES/COS3711/ASSIGNMENTS/Assignment1Q1-build-desktop'
    mingw32-make: Leaving directory `C:/UNISA MODULES/COS3711/ASSIGNMENTS/Assignment1Q1-build-desktop'
    debug/bookwriter.o:bookwriter.cpp.text$_ZN8BookListD1Ev[BookList::~BookList()]+0xb): undefined reference to `vtable for BookList'
    debug/bookwriter.o:bookwriter.cpp.text$_ZN8BookListC1ERKS_[BookList::BookList(BookList const&)]+0x23): undefined reference to `vtable for BookList'
    collect2: ld returned 1 exit status
    mingw32-make[1]: *** [debug\Assignment1Q1.exe] Error 1
    mingw32-make: *** [debug] Error 2
    The process "C:/Qt2/2010.04/mingw/bin/mingw32-make.exe" exited with code %2.
    Error while building project Assignment1Q1 (target: Desktop)
    When executing build step 'Make'

  2. #2
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: UNDEFINED REFERENCE TO vTable for BookList

    run qmake once again ..
    "Behind every great fortune lies a crime" - Balzac

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: UNDEFINED REFERENCE TO vTable for BookList

    You forgot to implement the declared constructor and destructor.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Undefined reference to vtable.
    By hakermania in forum Newbie
    Replies: 3
    Last Post: 10th September 2011, 18:10
  2. undefined reference to 'vtable ...'
    By GUIman in forum Newbie
    Replies: 5
    Last Post: 10th March 2011, 01:38
  3. Qt Undefined Reference to vtable
    By ctote in forum Qt Programming
    Replies: 18
    Last Post: 24th February 2010, 22:24
  4. Undefined reference to 'vtable for XXX'
    By Sheng in forum Qt Programming
    Replies: 4
    Last Post: 17th October 2008, 15:59
  5. undefined reference to vtable
    By renjithmamman in forum Qt Programming
    Replies: 5
    Last Post: 2nd July 2006, 04:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.