PDA

View Full Version : UNDEFINED REFERENCE TO vTable for BookList



ayanda83
4th March 2013, 07:00
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$_ZN8BookListD1E v[BookList::~BookList()]+0xb): undefined reference to `vtable for BookList'
debug/bookwriter.o:bookwriter.cpp:(.text$_ZN8BookListC1E RKS_[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'

wagmare
4th March 2013, 07:05
run qmake once again ..

wysota
4th March 2013, 08:56
You forgot to implement the declared constructor and destructor.