Results 1 to 5 of 5

Thread: Error when qsing qwt in qt application

  1. #1
    Join Date
    Apr 2011
    Posts
    58
    Thanks
    1

    Default Error when qsing qwt in qt application

    Hi.

    I had programmed a qt application. Everything runs fine.
    I like to add in some plotting function and found this wonderful qwt.
    So, I am now trying to integrate qwt into my qt application.
    But I got the following error.

    moc_myplotmap.obj:-1: error: LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMetaObject" (?staticMetaObject@QwtPlot@@2UQMetaObject@@B)

    In my .pro file, I've already done the
    QWT_ROOT = "c:\mydirectory\qwt-6.0"
    LIBS += -lmyspeciallibrary -lqwt -lqwtmathml
    LIBPATH += $${QWT_ROOT}/lib
    INCLUDEPATH += $${QWT_ROOT}/src
    qtAddLibrary(qwt)

    So, I dont know what else I am missing. Any help please?
    Thank you!!

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Error when qsing qwt in qt application

    Use the features file of Qwt - read the instructions in INSTALL how to do it.

    Uwe

  3. #3
    Join Date
    Apr 2011
    Posts
    58
    Thanks
    1

    Default Re: Error when qsing qwt in qt application

    Thanks.
    I read the INSTALL file and added the CONFIG += qwt.
    My error is still the same.
    Below is my .pro file.
    I really have no clue how to solve it. Any more help please.




    Qt Code:
    1. QT += core gui
    2. QWT_ROOT = "c:/mydirectory/qwt-6.0"
    3.  
    4. TARGET = myprogram
    5. TEMPLATE = app
    6.  
    7.  
    8. SOURCES += main.cpp\
    9. mainwindow.cpp \
    10. andmorewhateverfilesIneed.cpp
    11.  
    12. HEADERS += mainwindow.h \
    13. andmorewhateverfilesIneed.h
    14.  
    15.  
    16. DEFINES += QWT_DL
    17. CONFIG += qwt
    18. QMAKE_LIBDIR += $${QWT_ROOT}/lib
    19. INCLUDEPATH += $${QWT_ROOT}/src
    20. LIBS += -lqwt
    21. qtAddLibrary(qwt)
    22. FORMS += mainwindow.ui
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Error when qsing qwt in qt application

    Remove all lines you have added ( beside CONFIG += qwt ).

    Uwe

    PS: it's QWT_DLL not QWT_DL, but this define should be set by the qwt features file if you have configured qmake successfully

  5. #5
    Join Date
    Apr 2011
    Posts
    58
    Thanks
    1

    Default Re: Error when using qwt in qt application

    I did what exactly what is said. removed the lines etc.
    Problem persists.
    Is there someone who can give the exact meaning to the error of
    unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMetaObject"

    It seems to me that my codes

    Qt Code:
    1. #include <qwt_plot.h>
    2. #include <qwt_plot_spectrogram.h>
    3.  
    4. class myMap: public QwtPlot
    5. {
    6. Q_OBJECT
    7.  
    8. public:
    9. myMap(QWidget * = NULL);
    10.  
    11. public Q_SLOTS:
    12. // void showContour(bool on);
    13. // void showSpectrogram(bool on);
    14.  
    15. private:
    16. QwtPlotSpectrogram *d_spectrogram;
    17. };
    To copy to clipboard, switch view to plain text mode 

    the part "public QwtPlot" is the source of error?

Similar Threads

  1. Replies: 8
    Last Post: 5th November 2012, 08:43
  2. .EXE error when trying to run Application
    By ekartik82 in forum Newbie
    Replies: 4
    Last Post: 4th March 2010, 19:25
  3. getting the error message when trying to run the application in QT
    By pallavi Boyapat in forum Qt Programming
    Replies: 49
    Last Post: 31st October 2008, 12:18
  4. QWT application initialization error
    By Urban in forum Qwt
    Replies: 3
    Last Post: 17th September 2008, 10:17
  5. Exception Error in my application.
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2008, 12:02

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.