Important: Please read the Qt Code of Conduct -

Qwt Execute application

  • Hi,

    I have installed Qwt plugin (6.1.0) and I have Qt 5.0.1.
    I try to run a qwt application.
    here my .pro file:

    @include( /usr/local/qwt-6.1.0-svn/features/qwt.prf )

    QT += core gui
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = Project
    TEMPLATE = app

    CONFIG += qwt
    SOURCES += main.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui


    unix:!macx: LIBS += -L$$PWD/../../../../../usr/local/qwt-6.1.0-svn/lib/ -lqwt

    INCLUDEPATH += $$PWD/../../../../../usr/local/qwt-6.1.0-svn/include
    DEPENDPATH += $$PWD/../../../../../usr/local/qwt-6.1.0-svn/include@

    and here my main.cpp

    #include "mainwindow.h"
    #include <QApplication>
    #include <qwt_plot.h>

    int main(int argc, char argv[])
    QApplication a(argc, argv);
    plot = new QwtPlot(0);
    return a.exec();

    It simple and I can't execute my App.

    I have these erros:

    @*** glibc detected *** /home/: realloc(): invalid pointer: 0x05aa2d1c ***
    ======= Backtrace: =========

    Anyone got an idea of the problem?

    [edit, moved to "3rd Party Software", koahnig]

  • Lifetime Qt Champion


    Are you sure Qwt is compiled with your Qt 5.0.1 ?

    Also you have a memory leak. You don't destroy plot when your application ends

Log in to reply