Results 1 to 4 of 4

Thread: Interfacing to :qwt_plot_curve.h: void setSamples( const QVector< QPointF >& );

  1. #1
    Join Date
    Mar 2024
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11

    Question Interfacing to :qwt_plot_curve.h: void setSamples( const QVector< QPointF >& );

    Hi,

    I have a QPolygonF of points which I would like to pass to: qwt_plot_curve.h: void setSamples( const QVector< QPointF >& ) however I cannot seem to get the correct syntax:

    essential code snippet:

    QwtPlotCurve curve;
    .
    .
    QPolygonF points;
    .
    .
    points+=QPointF(xData, yData); // in loop
    .
    .
    curve.setSamples(points);

    My problem is that at link time I get the following error:

    undefined reference to `QwtPlotCurve::setSamples(QVector<QPointF> const&)'

    This is the only linker error all the other Qwt symbols are resolved.

    nm shows that the available symbols are:

    libqwt.so.6.3.0:000000000010df40 T QwtPlotCurve::setSamples(QList<QPointF> const&)
    libqwt.so.6.3.0:000000000010def0 T QwtPlotCurve::setSamples(QwtSeriesData<QPointF>*)
    libqwt.so.6.3.0:000000000010e588 T QwtPlotCurve::setSamples(QList<double> const&, QList<double> const&)
    libqwt.so.6.3.0:000000000010e850 T QwtPlotCurve::setSamples(QList<double> const&)
    libqwt.so.6.3.0:000000000010e990 T QwtPlotCurve::setSamples(float const*, float const*, int)
    libqwt.so.6.3.0:000000000010e718 T QwtPlotCurve::setSamples(double const*, int)
    libqwt.so.6.3.0:000000000010e8f0 T QwtPlotCurve::setSamples(QList<float> const&)
    libqwt.so.6.3.0:000000000010e650 T QwtPlotCurve::setSamples(QList<float> const&, QList<float> const&)
    libqwt.so.6.3.0:000000000010ecd8 T QwtPlotCurve::setSamples(float const*, int)
    libqwt.so.6.3.0:000000000010e230 T QwtPlotCurve::setSamples(double const*, double const*, int)

    Could anyone suggest a way forward, the Qt is version 6.5.2 Qwt is latest from git.

    Thanks

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

    Default Re: Interfacing to :qwt_plot_curve.h: void setSamples( const QVector< QPointF >& )

    QList and QVector are the same in Qt6.
    See qcontainerfwd.h:
    Qt Code:
    1. template<typename T> using QVector = QList<T>;
    To copy to clipboard, switch view to plain text mode 

    HTH,
    Uwe
    Last edited by Uwe; 13th March 2024 at 07:54.

  3. #3
    Join Date
    Mar 2024
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Interfacing to :qwt_plot_curve.h: void setSamples( const QVector< QPointF >& )

    Quote Originally Posted by Uwe View Post
    QList and QVector are the same in Qt6.
    See qcontainerfwd.h:
    Qt Code:
    1. template<typename T> using QVector = QList<T>;
    To copy to clipboard, switch view to plain text mode 

    HTH,
    Uwe
    Thanks I replaced the QPolygonF with QVector<QPointF> but I get the same linker error:

    My application is exporting the right unresolved symbol:

    myPlotApp.o: U QwtPlotCurve::setSamples(QVector<QPointF> const&)

    But the nearest sysmbol in libqwt.so.6.3.0 is:

    libqwt.so.6.3.0:000000000010df40 T QwtPlotCurve::setSamples(QList<QPointF> const&)

    I wonder if this is a compiler problem not a syntax issue ?

    the .o file in the Qwt build directory only refers to QList<QPointF> :

    src/obj/qwt_plot_curve.o:0000000000001840 T QwtPlotCurve::setSamples(QList<QPointF> const&)

  4. #4
    Join Date
    Mar 2024
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Interfacing to :qwt_plot_curve.h: void setSamples( const QVector< QPointF >& )

    I Think I solved the problem I rebuilt Qt6 and Qwt and my application (in that order) and the issue has gone.
    Thanks for the help.

Similar Threads

  1. Replies: 1
    Last Post: 12th January 2017, 17:54
  2. Replies: 9
    Last Post: 27th March 2014, 09:45
  3. Replies: 0
    Last Post: 22nd June 2013, 10:02
  4. Replies: 5
    Last Post: 2nd September 2011, 23:11
  5. Replies: 6
    Last Post: 7th October 2008, 12:14

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.