Results 1 to 4 of 4

Thread: Qt 5.2.0 and Qwt 6.1.0

  1. #1
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Qt 5.2.0 and Qwt 6.1.0

    Hi

    I will show you the error and my project files.

    Error:
    Starting D:\Documents\Qt\QwtExamples\0003_EmptyPlot_for_Qt5 \build-EmptyPlot_for_Qt5-Desktop_Qt_5_2_0_MinGW_32bit-Debug\debug\EmptyPlot_for_Qt5.exe...
    QWidget: Must construct a QApplication before a QWidget
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    EmptyPlot_for_Qt5.pro
    Qt Code:
    1. QWT_LOCATION = c:/Qwt-6.1.0
    2. INCLUDEPATH += $${QWT_LOCATION}/include
    3. LIBS = -L$${QWT_LOCATION}/lib \
    4. -lqwt
    5.  
    6. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    7.  
    8. SOURCES += \
    9. main.cpp
    To copy to clipboard, switch view to plain text mode 

    main.cpp
    Qt Code:
    1. #include <QApplication>
    2. #include <qwt_plot.h>
    3.  
    4. int main(int argc, char **argv)
    5. {
    6. QApplication app(argc, argv);
    7.  
    8. QwtPlot plot;
    9. plot.show();
    10.  
    11. return app.exec();
    12. }
    To copy to clipboard, switch view to plain text mode 

    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: Qt 5.2.0 and Qwt 6.1.0

    AFAIR this is a build issue unrelated to fhe Qt or Qwt version. Look into the archive how to solve it ( I don't use Windows myself but it might be because of "DEFINES *= QWT_DLL" is missing ).

    To avoid issues like this one install Qwt in the recommended way and use "CONFIG += qwt" instead of ttrying to figure out your profile manually. But if you insist on doing it yourself - at least have a look at qwt.prf to see what needs to be done.

    Uwe

  3. The following user says thank you to Uwe for this useful post:

    8Observer8 (4th January 2014)

  4. #3
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Re: Qt 5.2.0 and Qwt 6.1.0

    I don't use Windows myself but it might be because of "DEFINES *= QWT_DLL" is missing
    Where? I don't understand. Before installing? What is the file?

    To avoid issues like this one install Qwt in the recommended way and use "CONFIG += qwt"
    What is "recommended way"? I installed qwt like this:

    - in "qwtbuild.pri":
    #CONFIG += silent
    - in console:
    qmake qwt.pro
    mingw32-make
    mingw32-make install
    - I see this files in "C:\Qwt-6.1.0\lib":
    libqwt.a
    libqwtd.a
    qwt.dll
    qwt.lib
    qwtd.dll
    qwtd.lib

  5. #4
    Join Date
    Jun 2010
    Posts
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 5.2.0 and Qwt 6.1.0

    I just had the same problem. Try linking to "-lqwtd" instead if you are going to use debugging.

  6. The following user says thank you to Eric89GXL for this useful post:

    8Observer8 (2nd February 2014)

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.