Results 1 to 2 of 2

Thread: undefined reference to `AddLinkFolder::AddLinkFolder(QWidget*)'

  1. #1
    Join Date
    Mar 2010
    Posts
    54
    Qt products
    Qt/Embedded
    Platforms
    Symbian S60

    Default undefined reference to `AddLinkFolder::AddLinkFolder(QWidget*)'

    Hello to Everyone
    While executing the application , I get the error

    undefined reference to `AddLinkFolder::AddLinkFolder(QWidget*)'

    I have created AddLinkFolder as a library
    PRO file of the AddLinkFolder library
    The location where the libraries gets generated is : /home/LUIDIA/Test/Lib
    Qt Code:
    1. QT += gui \
    2. core\
    3. network \
    4. xml
    5.  
    6. TARGET = AddFolder
    7. TEMPLATE = lib
    8.  
    9. CONFIG += dynamic debug
    10.  
    11. SOURCES += main.cpp\
    12. addlinkwindow.cpp \
    13. browsemodel.cpp
    14.  
    15. HEADERS += addlinkwindow.h \
    16. browsemodel.h
    To copy to clipboard, switch view to plain text mode 

    PRO file for the Gallery Application
    The location where the libraries gets generated is : /home/LUIDIA/Test/Gallery
    Qt Code:
    1. QT += core gui
    2.  
    3. TARGET = GALLERY
    4. TEMPLATE = app
    5.  
    6. SOURCES += main.cpp\
    7. mainwindow.cpp \
    8. settingstree.cpp \
    9. displayframe.cpp \
    10. PanelFrame.cpp \
    11. eBeamTree.cpp \
    12. MainFrame.cpp
    13.  
    14. HEADERS += mainwindow.h \
    15. settingstree.h \
    16. displayframe.h \
    17. PanelFrame.h \
    18. eBeamTree.h \
    19. MainFrame.h
    20.  
    21. RESOURCES += \
    22. Gall.qrc
    23.  
    24. LIBS += -L../../Test/Lib-lAddFolder
    25.  
    26.  
    27.  
    28. unix {
    29. # adding all these versions because Qt by default creates 3 levels of linking for version control
    30. AddFolder.target = libAddFolder.so
    31. AddFolder.commands = $(COPY) ../../Test/Lib/libAddFolder.so $$AddFolder.target
    32. AddFolder.depends = ../../Test/Lib/libAddFolder.so
    33.  
    34. AddFolder1.target = libAddFolder.so.1
    35. AddFolder1.commands = $(COPY) ../../Test/Lib/libAddFolder.so.1 $$AddFolder1.target
    36. AddFolder1.depends = ../../Test/Lib/libAddFolder.so.1
    37.  
    38. AddFolder10.target = libAddFolder.so.1.0
    39. AddFolder10.commands = $(COPY) ../../Test/Lib/libAddFolder.so.1.0 $$AddFolder10.target
    40. AddFolder10.depends = ../../Test/Lib/libAddFolder.so.1.0
    41.  
    42. AddFolder100.target = libAddFolder.so.1.0.0
    43. AddFolder100.commands = $(COPY) ../../Test/Lib/libAddFolder.so.1.0.0 $$AddFolder100.target
    44. AddFolder100.depends = ../../Test/Lib/libAddFolder.so.1.0.0
    45.  
    46. QMAKE_EXTRA_TARGETS += AddFolder AddFolder1 AddFolder10 AddFolder100
    47. POST_TARGETDEPS += libAddFolder.so libAddFolder.so.1 libAddFolder.so.1.0 libAddFolder.so.1.0.0
    48.  
    49. QMAKE_LFLAGS += -Wl,-rpath .
    50.  
    51. }
    To copy to clipboard, switch view to plain text mode 


    I have added the LD_LIBRARY_PATH : /home/LUIDIA/Test/Gallery;/home/LUIDIA/Test/Lib
    at the
    Gallery->ProjectSettings->Run Settings->Build Environment


    Attached are the compiler outputs for the library
    AddLinkFolder and Application Gallery
    Attached Files Attached Files
    Last edited by kamlmish; 14th January 2011 at 09:16.

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: undefined reference to `AddLinkFolder::AddLinkFolder(QWidget*)'

    I think the problem is
    Qt Code:
    1. LIBS += -L../../Test/Lib-lAddFolder
    To copy to clipboard, switch view to plain text mode 
    add a blank before -lAddFolder
    Qt Code:
    1. LIBS += -L../../Test/Lib -lAddFolder
    To copy to clipboard, switch view to plain text mode 
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. Replies: 8
    Last Post: 3rd September 2013, 09:51
  2. Undefined reference
    By eekhoorn12 in forum Qt Programming
    Replies: 2
    Last Post: 6th January 2011, 15:45
  3. undefined reference
    By jayreddy in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2009, 13:45
  4. Replies: 6
    Last Post: 14th May 2009, 12:02
  5. Undefined reference
    By Salazaar in forum Newbie
    Replies: 12
    Last Post: 23rd May 2007, 10:21

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.