Results 1 to 12 of 12

Thread: Qwt examples

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qwt examples

    Quote Originally Posted by 31512 View Post
    unix:LIBS += -L/qwt/lib -llibqwt
    It should be:

    unix:LIBS += -L/qwt/lib -lqwt

  2. #2
    Join Date
    Jun 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qwt examples

    Quote Originally Posted by jacek View Post
    It should be:

    unix:LIBS += -L/qwt/lib -lqwt
    My respect to you! It works! It must be admitted that, the truth is that I am old stupid monkey! Can you explain why it should be -L/qwt/lib -lqwt, but not -L/qwt/lib -llibqwt?

  3. #3
    Join Date
    Jun 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qwt examples

    All was good until I wrote
    Qt Code:
    1. WidgetFrameCommonView::WidgetFrameCommonView( QWidget *parent )
    2. : QWidget( parent )
    3. {
    4. setupUi( this );
    5.  
    6. QwtPlotHistogram *histogram = new QwtPlotHistogram();
    7. //histogram->setStyle(QwtPlotHistogram::Columns);
    8. //histogram->setPen(QPen(Qt::black));
    9. //histogram->setBrush(QBrush(Qt::gray));
    10. //histogram->attach(Plot);
    11. //Plot->replot();
    12.  
    13. CommonInfoPanel->SetBackGroundColor( Qt::lightGray );
    14. SeparatorsPanelsPanel->SetBackGroundColor( Qt::gray );
    15. gridLayout->setContentsMargins( 0, 0, 0, 0 );
    16. gridLayout->setSpacing( 0 );
    17. }
    To copy to clipboard, switch view to plain text mode 

    linking RadosSeparatorQT (g++)
    WidgetFrameCommonView.o: In function `WidgetFrameCommonView':
    /home/Andrei/Projects/Rados/RadosSeparatorQT/Frames/WidgetFrameCommonView.cpp:9: undefined reference to `QwtPlotHistogram::QwtPlotHistogram(QString const&)'
    /home/Andrei/Projects/Rados/RadosSeparatorQT/Frames/WidgetFrameCommonView.cpp:9: undefined reference to `QwtPlotHistogram::QwtPlotHistogram(QString const&)'
    collect2: ld returned 1 exit status
    gmake: *** [RadosSeparatorQT] Error 1
    gmake: Target `first' not remade because of errors.
    *** Exited with status: 2 ***

    Without
    Qt Code:
    1. QwtPlotHistogram *histogram = new QwtPlotHistogram();
    To copy to clipboard, switch view to plain text mode 
    linking is successful. As I understood class QwtPlotHistogram have some bugs?

    Qt Code:
    1. class QWT_EXPORT QwtPlotHistogram: public QwtPlotSeriesItem<QwtIntervalSample>
    2. {
    3. public:
    4. enum CurveStyle
    5. {
    6. NoCurve,
    7.  
    8. Outline,
    9.  
    10. Columns,
    11. Lines,
    12.  
    13. UserCurve = 100
    14. };
    15.  
    16. explicit QwtPlotHistogram(const QString &title = QString::null);
    17. explicit QwtPlotHistogram(const QwtText &title);
    18. virtual ~QwtPlotHistogram();
    19.  
    20. ...
    21. };
    22. #endif
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Jun 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qwt examples

    Histogram example was compiled and linked successfully. Executed successfully too. I`m perplexed... My program still generating link errors.
    Last edited by 31512; 2nd July 2008 at 10:54.

  5. #5
    Join Date
    Jun 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qwt examples

    OK. Problem solved successfully. Including examples.pri (with some modifications) to *.pro file of my project makes wonder...

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qwt examples

    Quote Originally Posted by 31512 View Post
    Can you explain why it should be -L/qwt/lib -lqwt, but not -L/qwt/lib -llibqwt?
    It's UNIX naming convention. All library file names start with "lib", so somebody in the Olde Days decided to skip it in linker options.

  7. #7
    Join Date
    Jun 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qwt examples

    Quote Originally Posted by jacek View Post
    It's UNIX naming convention. All library file names start with "lib", so somebody in the Olde Days decided to skip it in linker options.
    Thanks a lot! Live and learn... RTFM for me.

Similar Threads

  1. Qwt examples
    By nitriles in forum Qwt
    Replies: 7
    Last Post: 6th August 2011, 04:07
  2. Replies: 7
    Last Post: 9th May 2009, 22:31
  3. QWT introduction
    By nitriles in forum Qwt
    Replies: 4
    Last Post: 28th September 2007, 10:48
  4. How to upgrade Qwt 5.0.1 to Qwt 5.0.2
    By luffy27 in forum Qwt
    Replies: 1
    Last Post: 15th July 2007, 19:55
  5. use interesting QWT Library with QT3.X
    By raphaelf in forum Qwt
    Replies: 2
    Last Post: 23rd January 2006, 11:24

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.