Results 1 to 1 of 1

Thread: Custom widget plugin linker error

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2010
    Location
    Russia, Omsk
    Posts
    28
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Custom widget plugin linker error

    Hi, folks. I had seen many posts on forum but didn`t resolve my issue.
    I have two custom widgets. The first is from qt sdk (customwidgetplugin) and the second IconEditor (example from C++ GUI Programming with Qt 4 (Second Edition) Jasmin Blanchette and Mark Summerfield)

    I compiled IconEditor successfully and got lib, exp and dll

    I placed them to C:\Libs\cpp\QT\4.6\qt\plugins\designer (near customwidgetplugin and other plugins)
    Also I placed sources of IconEditor to C:\Libs\cpp\QT\4.6\qt\examples\designer

    I created progect "trymyplugin".

    trymyplugin.pro looks like

    Qt Code:
    1. TARGET = trymyplugin
    2. TEMPLATE = app
    3. SOURCES += main.cpp \
    4. mainwindow.cpp
    5. HEADERS += mainwindow.h \
    6. iconeditor.h
    7. FORMS += mainwindow.ui
    8. DEPENDPATH += .
    9. INCLUDEPATH += C:\Libs\cpp\QT\4.6\qt\examples\designer\customwidgetplugin \
    10. C:\Libs\cpp\QT\4.6\qt\examples\designer\iconeditorplugin
    11. LIBS += -LC:\Libs\cpp\QT\4.6\qt\plugins\designer \
    12. -lcustomwidgetplugin \
    13. -liconeditorplugin
    To copy to clipboard, switch view to plain text mode 

    AnalogClock works perfectly, but when I add IconEditor on form I get linker errors:
    mainwindow.obj:-1: error: unresolved external symbol "public: __thiscall IconEditor::IconEditor(class QWidget *)" (??0IconEditor@@QAE@PAVQWidget@@@Z) referenced in function "public: __thiscall MainWindow::MainWindow(class QWidget *)" (??0MainWindow@@QAE@PAVQWidget@@@Z)
    moc_iconeditor.obj:-1: error: unresolved external symbol "public: void __thiscall IconEditor::setPenColor(class QColor const &)" (?setPenColor@IconEditor@@QAEXABVQColor@@@Z) referenced in function "public: virtual int __thiscall IconEditor::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@IconEditor@@UAEHW4Call@QMetaObject@@ HPAPAX@Z)
    moc_iconeditor.obj:-1: error: unresolved external symbol "public: void __thiscall IconEditor::setIconImage(class QImage const &)" (?setIconImage@IconEditor@@QAEXABVQImage@@@Z) referenced in function "public: virtual int __thiscall IconEditor::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@IconEditor@@UAEHW4Call@QMetaObject@@ HPAPAX@Z)
    moc_iconeditor.obj:-1: error: unresolved external symbol "public: void __thiscall IconEditor::setZoomFactor(int)" (?setZoomFactor@IconEditor@@QAEXH@Z) referenced in function "public: virtual int __thiscall IconEditor::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@IconEditor@@UAEHW4Call@QMetaObject@@ HPAPAX@Z)
    What`s wrong. Could you help me please.
    Last edited by Annihilator; 4th March 2010 at 19:25.

Similar Threads

  1. Linker error (app+plugin) on Linux Qt 4.5.1
    By janus in forum Qt Programming
    Replies: 1
    Last Post: 18th May 2009, 12:43
  2. Linker error
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 14th July 2008, 14:30
  3. Replies: 5
    Last Post: 21st February 2007, 22:11
  4. Linker error
    By alfblt16 in forum Qt Programming
    Replies: 2
    Last Post: 28th September 2006, 09:20
  5. Linker Error
    By ankurjain in forum Qt Programming
    Replies: 2
    Last Post: 5th April 2006, 05:45

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.