Results 1 to 6 of 6

Thread: qwt

  1. #1
    Join Date
    Sep 2008
    Location
    Slovakia, Nitra
    Posts
    15
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question qwt

    Hi, I have gentoo linux, and I emerged qwt 5.0.2-r1 without any problem.
    But it doesn't work for me.
    For this short program:

    Qt Code:
    1. #include <QApplication>
    2. #include <qwt_plot.h>
    3. int main(int argc, char *argv[])
    4. {
    5. QApplication app(argc, argv);
    6. QwtPlot plot; // ! here i tryed the qwt
    7. return app.exec();
    8. }
    To copy to clipboard, switch view to plain text mode 

    ...I get this reply:
    g++ -c -pipe -O2 -march=pentium-m -fomit-frame-pointer -pipe -march=pentium-m -msse2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include -I/usr/include -I/include -I. -I. -o hello.o hello.cpp
    hello.cpp:3:22: error: qwt_plot.h: No such file or directory
    hello.cpp: In function 'int main(int, char**)':
    hello.cpp:9: error: 'QwtPlot' was not declared in this scope
    hello.cpp:9: error: expected `;' before 'plot'
    make: *** [hello.o] Error 1
    I followed this tutorial
    ...that means, i did the following steps:
    $ echo "/usr/lib" >> /etc/ld.so/conf

    ...and than without any IDE, i did next:
    # qmake -project

    ...the .pro file i edited like this:
    Qt Code:
    1. TEMPLATE = app
    2. TARGET =
    3. DEPENDPATH += .
    4. # i'm not sure which is correct of following
    5. INCLUDEPATH += /usr/include /usr/local/include $(QWT)/include
    6. LIBS += -lqwt
    7.  
    8. # Input
    9. SOURCES += hello.cpp
    To copy to clipboard, switch view to plain text mode 
    ...than
    # qmake -o makefile hello.pro
    ...After the make command I get the result which is quoted upper.

    ...I checked my direcotoryes:
    in usr/lib i have the following files
    libqwt.so
    libqwt.so.5
    libqwt.so.5.0
    libqwt.so.5.0.2

    in usr/local/include i have the qwt5 directory with header files.

    My question is: What did i wrong? Yes surelly i'm newbie, that's the reason why i posted it here. Also sorry for my english..

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qwt

    Do you have the header files installed? Where is qwt_plot.h located in your system?

    By the way, please give a more descriptive title to the thread next time...
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    Vincenzo (23rd February 2009)

  4. #3
    Join Date
    Sep 2008
    Location
    Slovakia, Nitra
    Posts
    15
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qwt

    the qwt_plot.h i have in /usr/include/qwt5
    ...sorry for the title

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qwt

    Add this to your .pro file:
    qmake Code:
    1. INCLUDEPATH+=/usr/include/qwt5
    2. LIBS += -lqwt
    To copy to clipboard, switch view to plain text mode 

    and rerun qmake. You might have to replace -lqwt with -lqwt5 depending on what is the library called on your system.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    Vincenzo (23rd February 2009)

  7. #5
    Join Date
    Sep 2008
    Location
    Slovakia, Nitra
    Posts
    15
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qwt

    thank you very much!!! It works! )
    ...i never managed .pro files, always left it to IDE

    once again: thank you!

  8. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qwt

    Quote Originally Posted by Vincenzo View Post
    ...i never managed .pro files, always left it to IDE
    In that case tell your IDE to look for includes in /usr/include/qwt5 and link with the qwt library.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QWT embedded
    By damien in forum Qwt
    Replies: 3
    Last Post: 20th February 2011, 19:26
  2. Step by step Qwt on MinGW
    By Doug Broadwell in forum Qwt
    Replies: 2
    Last Post: 23rd January 2009, 00:19
  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

Tags for this Thread

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.