PDA

View Full Version : Linker Errors



MarkoSan
7th March 2006, 13:57
The project compiles succesfully, but when going to link stage, following errors are detected:


Compiler: Qt Compilation
Building Makefile: "C:\Documents and Settings\markofr\My Documents\projects\working_copy\Makefile.win"
Executing make clean
rm -f mainwindow.o CCustomerBrowser.o CCustomerUpdateDialog.o main.o POSSystem_private.res POSSystem.exe

g++.exe -c mainwindow.cpp -o mainwindow.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"D:/Qt/4.1.0/include" -I"D:/Qt/4.1.0/include/ActiveQt" -I"D:/Qt/4.1.0/include/Qt" -I"D:/Qt/4.1.0/include/Qt3Support" -I"D:/Qt/4.1.0/include/QtAssistant" -I"D:/Qt/4.1.0/include/QtCore" -I"D:/Qt/4.1.0/include/QtDesigner" -I"D:/Qt/4.1.0/include/QtGui" -I"D:/Qt/4.1.0/include/QtNetwork" -I"D:/Qt/4.1.0/include/QtOpenGL" -I"D:/Qt/4.1.0/include/QtSql" -I"D:/Qt/4.1.0/include/QtSvg" -I"D:/Qt/4.1.0/include/QtTest" -I"D:/Qt/4.1.0/include/QtUiTools" -I"D:/Qt/4.1.0/include/QtXml" -I"D:/Qt/4.1.0/include/Qt/arch" -I"D:/Qt/4.1.0/include/Qt3Support/private" -I"D:/Qt/4.1.0/include/QtCore/arch" -I"D:/Qt/4.1.0/include/QtCore/private" -I"D:/Qt/4.1.0/include/QtDesigner/private" -I"D:/Qt/4.1.0/include/QtGui/private" -I"D:/Qt/4.1.0/include/QtNetwork/private" -I"D:/Qt/4.1.0/include/QtOpenGL/private" -I"D:/Qt/4.1.0/include/QtSql/private" -I"D:/Qt/4.1.0/include/QtSvg/private" -I"D:/Qt/4.1.0/include/QtTest/private" -fmessage-length=0

g++.exe -c CCustomerBrowser.cpp -o CCustomerBrowser.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"D:/Qt/4.1.0/include" -I"D:/Qt/4.1.0/include/ActiveQt" -I"D:/Qt/4.1.0/include/Qt" -I"D:/Qt/4.1.0/include/Qt3Support" -I"D:/Qt/4.1.0/include/QtAssistant" -I"D:/Qt/4.1.0/include/QtCore" -I"D:/Qt/4.1.0/include/QtDesigner" -I"D:/Qt/4.1.0/include/QtGui" -I"D:/Qt/4.1.0/include/QtNetwork" -I"D:/Qt/4.1.0/include/QtOpenGL" -I"D:/Qt/4.1.0/include/QtSql" -I"D:/Qt/4.1.0/include/QtSvg" -I"D:/Qt/4.1.0/include/QtTest" -I"D:/Qt/4.1.0/include/QtUiTools" -I"D:/Qt/4.1.0/include/QtXml" -I"D:/Qt/4.1.0/include/Qt/arch" -I"D:/Qt/4.1.0/include/Qt3Support/private" -I"D:/Qt/4.1.0/include/QtCore/arch" -I"D:/Qt/4.1.0/include/QtCore/private" -I"D:/Qt/4.1.0/include/QtDesigner/private" -I"D:/Qt/4.1.0/include/QtGui/private" -I"D:/Qt/4.1.0/include/QtNetwork/private" -I"D:/Qt/4.1.0/include/QtOpenGL/private" -I"D:/Qt/4.1.0/include/QtSql/private" -I"D:/Qt/4.1.0/include/QtSvg/private" -I"D:/Qt/4.1.0/include/QtTest/private" -fmessage-length=0

g++.exe -c CCustomerUpdateDialog.cpp -o CCustomerUpdateDialog.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"D:/Qt/4.1.0/include" -I"D:/Qt/4.1.0/include/ActiveQt" -I"D:/Qt/4.1.0/include/Qt" -I"D:/Qt/4.1.0/include/Qt3Support" -I"D:/Qt/4.1.0/include/QtAssistant" -I"D:/Qt/4.1.0/include/QtCore" -I"D:/Qt/4.1.0/include/QtDesigner" -I"D:/Qt/4.1.0/include/QtGui" -I"D:/Qt/4.1.0/include/QtNetwork" -I"D:/Qt/4.1.0/include/QtOpenGL" -I"D:/Qt/4.1.0/include/QtSql" -I"D:/Qt/4.1.0/include/QtSvg" -I"D:/Qt/4.1.0/include/QtTest" -I"D:/Qt/4.1.0/include/QtUiTools" -I"D:/Qt/4.1.0/include/QtXml" -I"D:/Qt/4.1.0/include/Qt/arch" -I"D:/Qt/4.1.0/include/Qt3Support/private" -I"D:/Qt/4.1.0/include/QtCore/arch" -I"D:/Qt/4.1.0/include/QtCore/private" -I"D:/Qt/4.1.0/include/QtDesigner/private" -I"D:/Qt/4.1.0/include/QtGui/private" -I"D:/Qt/4.1.0/include/QtNetwork/private" -I"D:/Qt/4.1.0/include/QtOpenGL/private" -I"D:/Qt/4.1.0/include/QtSql/private" -I"D:/Qt/4.1.0/include/QtSvg/private" -I"D:/Qt/4.1.0/include/QtTest/private" -fmessage-length=0

g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"D:/Qt/4.1.0/include" -I"D:/Qt/4.1.0/include/ActiveQt" -I"D:/Qt/4.1.0/include/Qt" -I"D:/Qt/4.1.0/include/Qt3Support" -I"D:/Qt/4.1.0/include/QtAssistant" -I"D:/Qt/4.1.0/include/QtCore" -I"D:/Qt/4.1.0/include/QtDesigner" -I"D:/Qt/4.1.0/include/QtGui" -I"D:/Qt/4.1.0/include/QtNetwork" -I"D:/Qt/4.1.0/include/QtOpenGL" -I"D:/Qt/4.1.0/include/QtSql" -I"D:/Qt/4.1.0/include/QtSvg" -I"D:/Qt/4.1.0/include/QtTest" -I"D:/Qt/4.1.0/include/QtUiTools" -I"D:/Qt/4.1.0/include/QtXml" -I"D:/Qt/4.1.0/include/Qt/arch" -I"D:/Qt/4.1.0/include/Qt3Support/private" -I"D:/Qt/4.1.0/include/QtCore/arch" -I"D:/Qt/4.1.0/include/QtCore/private" -I"D:/Qt/4.1.0/include/QtDesigner/private" -I"D:/Qt/4.1.0/include/QtGui/private" -I"D:/Qt/4.1.0/include/QtNetwork/private" -I"D:/Qt/4.1.0/include/QtOpenGL/private" -I"D:/Qt/4.1.0/include/QtSql/private" -I"D:/Qt/4.1.0/include/QtSvg/private" -I"D:/Qt/4.1.0/include/QtTest/private" -fmessage-length=0

windres.exe -i POSSystem_private.rc --input-format=rc -o POSSystem_private.res -O coff

g++.exe mainwindow.o CCustomerBrowser.o CCustomerUpdateDialog.o main.o POSSystem_private.res -o "POSSystem.exe" -L"C:/Dev-Cpp/lib" -L"D:/Qt/4.1.0/lib" -L"D:/Qt/4.1.0/lib" -mwindows D:/Qt/4.1.0/lib/libQtXmld4.a D:/Qt/4.1.0/lib/libQt3Support4.a D:/Qt/4.1.0/lib/libQt3Supportd4.a D:/Qt/4.1.0/lib/libQtAssistantClient.a D:/Qt/4.1.0/lib/libQtAssistantClientd.a D:/Qt/4.1.0/lib/libQtCore4.a D:/Qt/4.1.0/lib/libQtCored4.a D:/Qt/4.1.0/lib/libQtDesigner4.a D:/Qt/4.1.0/lib/libQtDesignerComponents4.a D:/Qt/4.1.0/lib/libQtDesignerComponentsd4.a D:/Qt/4.1.0/lib/libQtDesignerd4.a D:/Qt/4.1.0/lib/libQtGui4.a D:/Qt/4.1.0/lib/libQtGuid4.a D:/Qt/4.1.0/lib/libqtmain.a D:/Qt/4.1.0/lib/libqtmaind.a D:/Qt/4.1.0/lib/libQtNetwork4.a D:/Qt/4.1.0/lib/libQtNetworkd4.a D:/Qt/4.1.0/lib/libQtOpenGL4.a D:/Qt/4.1.0/lib/libQtOpenGLd4.a D:/Qt/4.1.0/lib/libQtSql4.a D:/Qt/4.1.0/lib/libQtSqld4.a D:/Qt/4.1.0/lib/libQtSvg4.a D:/Qt/4.1.0/lib/libQtSvgd4.a D:/Qt/4.1.0/lib/libQtTest4.a D:/Qt/4.1.0/lib/libQtTest_debug4.a D:/Qt/4.1.0/lib/libQtUiTools.a D:/Qt/4.1.0/lib/libQtUiToolsd.a D:/Qt/4.1.0/lib/libQtXml4.a -fmessage-length=0

mainwindow.o(.text+0x170):mainwindow.cpp: undefined reference to `vtable for CMainWindow'
mainwindow.o(.text+0x17c):mainwindow.cpp: undefined reference to `vtable for CMainWindow'
mainwindow.o(.text+0x2fe):mainwindow.cpp: undefined reference to `vtable for CMainWindow'
mainwindow.o(.text+0x30a):mainwindow.cpp: undefined reference to `vtable for CMainWindow'

CCustomerBrowser.o(.text+0x173):CCustomerBrowser.c pp: undefined reference to `vtable for CCustomerBrowser'
CCustomerBrowser.o(.text+0x17f):CCustomerBrowser.c pp: undefined reference to `vtable for CCustomerBrowser'
CCustomerBrowser.o(.text+0x9b1):CCustomerBrowser.c pp: undefined reference to `vtable for CCustomerBrowser'
CCustomerBrowser.o(.text+0x9bd):CCustomerBrowser.c pp: undefined reference to `vtable for CCustomerBrowser'

CCustomerBrowser.o(.text+0x11b6):CCustomerBrowser. cpp: undefined reference to `vtable for CCustomerBrowser'
CCustomerBrowser.o(.text+0x11c2):CCustomerBrowser. cpp: more undefined references to `vtable for CCustomerBrowser' follow
CCustomerUpdateDialog.o(.text+0x179):CCustomerUpda teDialog.cpp: undefined reference to `vtable for CCustomerUpdateDialog'
CCustomerUpdateDialog.o(.text+0x185):CCustomerUpda teDialog.cpp: undefined reference to `vtable for CCustomerUpdateDialog'
CCustomerUpdateDialog.o(.text+0x355):CCustomerUpda teDialog.cpp: undefined reference to `vtable for CCustomerUpdateDialog'
CCustomerUpdateDialog.o(.text+0x361):CCustomerUpda teDialog.cpp: undefined reference to `vtable for CCustomerUpdateDialog'
CCustomerUpdateDialog.o(.text+0x4c3):CCustomerUpda teDialog.cpp: undefined reference to `vtable for CCustomerUpdateDialog'
CCustomerUpdateDialog.o(.text+0x4cf):CCustomerUpda teDialog.cpp: more undefined references to `vtable for CCustomerUpdateDialog' follow
main.o(.text$_ZN11CMainWindowD1Ev[CMainWindow::~CMainWindow()]+0xb):main.cpp: undefined reference to `vtable for CMainWindow'
main.o(.text$_ZN11CMainWindowD1Ev[CMainWindow::~CMainWindow()]+0x17):main.cpp: undefined reference to `vtable for CMainWindow'
collect2: ld returned 1 exit status

make.exe: *** [POSSystem.exe] Error 1

Execution terminated


What is wrong, please help!!

zlatko
7th March 2006, 14:06
Problem can hide in your path spaces. Change projects path on easy and try rebuild.

MarkoSan
7th March 2006, 17:25
I did, same thing, is it possible project is being wrongly configured?

jacek
7th March 2006, 17:49
Did you run qmake to get a new Makefile?

MarkoSan
7th March 2006, 19:00
No, because i do not know how to force DevC++ to call it.

jacek
7th March 2006, 19:30
No, because i do not know how to force DevC++ to call it.
Then run it by hand and search the forum --- there were some threads about using DevC++ and Qt.