Results 1 to 6 of 6

Thread: Linker Errors

  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Linker Errors

    The project compiles succesfully, but when going to link stage, following errors are detected:
    Qt Code:
    1. Compiler: Qt Compilation
    2. Building Makefile: "C:\Documents and Settings\markofr\My Documents\projects\working_copy\Makefile.win"
    3. Executing make clean
    4. rm -f mainwindow.o CCustomerBrowser.o CCustomerUpdateDialog.o main.o POSSystem_private.res POSSystem.exe
    5.  
    6. 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
    7.  
    8. 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
    9.  
    10. 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
    11.  
    12. 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
    13.  
    14. windres.exe -i POSSystem_private.rc --input-format=rc -o POSSystem_private.res -O coff
    15.  
    16. 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
    17.  
    18. mainwindow.o(.text+0x170):mainwindow.cpp: undefined reference to `vtable for CMainWindow'
    19. mainwindow.o(.text+0x17c):mainwindow.cpp: undefined reference to `vtable for CMainWindow'
    20. mainwindow.o(.text+0x2fe):mainwindow.cpp: undefined reference to `vtable for CMainWindow'
    21. mainwindow.o(.text+0x30a):mainwindow.cpp: undefined reference to `vtable for CMainWindow'
    22.  
    23. CCustomerBrowser.o(.text+0x173):CCustomerBrowser.cpp: undefined reference to `vtable for CCustomerBrowser'
    24. CCustomerBrowser.o(.text+0x17f):CCustomerBrowser.cpp: undefined reference to `vtable for CCustomerBrowser'
    25. CCustomerBrowser.o(.text+0x9b1):CCustomerBrowser.cpp: undefined reference to `vtable for CCustomerBrowser'
    26. CCustomerBrowser.o(.text+0x9bd):CCustomerBrowser.cpp: undefined reference to `vtable for CCustomerBrowser'
    27.  
    28. CCustomerBrowser.o(.text+0x11b6):CCustomerBrowser.cpp: undefined reference to `vtable for CCustomerBrowser'
    29. CCustomerBrowser.o(.text+0x11c2):CCustomerBrowser.cpp: more undefined references to `vtable for CCustomerBrowser' follow
    30. CCustomerUpdateDialog.o(.text+0x179):CCustomerUpdateDialog.cpp: undefined reference to `vtable for CCustomerUpdateDialog'
    31. CCustomerUpdateDialog.o(.text+0x185):CCustomerUpdateDialog.cpp: undefined reference to `vtable for CCustomerUpdateDialog'
    32. CCustomerUpdateDialog.o(.text+0x355):CCustomerUpdateDialog.cpp: undefined reference to `vtable for CCustomerUpdateDialog'
    33. CCustomerUpdateDialog.o(.text+0x361):CCustomerUpdateDialog.cpp: undefined reference to `vtable for CCustomerUpdateDialog'
    34. CCustomerUpdateDialog.o(.text+0x4c3):CCustomerUpdateDialog.cpp: undefined reference to `vtable for CCustomerUpdateDialog'
    35. CCustomerUpdateDialog.o(.text+0x4cf):CCustomerUpdateDialog.cpp: more undefined references to `vtable for CCustomerUpdateDialog' follow
    36. main.o(.text$_ZN11CMainWindowD1Ev[CMainWindow::~CMainWindow()]+0xb):main.cpp: undefined reference to `vtable for CMainWindow'
    37. main.o(.text$_ZN11CMainWindowD1Ev[CMainWindow::~CMainWindow()]+0x17):main.cpp: undefined reference to `vtable for CMainWindow'
    38. collect2: ld returned 1 exit status
    39.  
    40. make.exe: *** [POSSystem.exe] Error 1
    41.  
    42. Execution terminated
    To copy to clipboard, switch view to plain text mode 

    What is wrong, please help!!
    Qt 5.3 Opensource & Creator 3.1.2

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Linker Errors

    Problem can hide in your path spaces. Change projects path on easy and try rebuild.
    a life without programming is like an empty bottle

  3. #3
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Linker Errors

    I did, same thing, is it possible project is being wrongly configured?
    Qt 5.3 Opensource & Creator 3.1.2

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linker Errors

    Did you run qmake to get a new Makefile?

  5. #5
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Linker Errors

    No, because i do not know how to force DevC++ to call it.
    Qt 5.3 Opensource & Creator 3.1.2

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linker Errors

    Quote Originally Posted by MarkoSan
    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.

Similar Threads

  1. Qt4 Lib -- Linker Problems Qt4/OpenGL
    By Jackson.Shredder in forum Qt Programming
    Replies: 6
    Last Post: 19th January 2009, 19:22
  2. Vtable linker error
    By jhearon in forum Qt Programming
    Replies: 3
    Last Post: 22nd July 2007, 18:31
  3. Example QtUiTools linker error
    By phillies in forum Newbie
    Replies: 1
    Last Post: 26th June 2007, 22:27
  4. Linker errors!!
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 25th April 2006, 09:14

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.