Results 1 to 8 of 8

Thread: Qwt examples are working but,Not able to run selfdesigned qwt applications!

  1. #1
    Join Date
    Feb 2008
    Posts
    74
    Thanks
    31
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Question Qwt examples are working but,Not able to run selfdesigned qwt applications!

    Hello! Friends,
    I am working in WinXp with Qt4.3.4. Also i have installed qwt library and can use qwt plugin in Qt. All the qwt examples are compiled and working properly.

    But today i tried to design a simple GUI widget form containing 2 pushbuttons & QwtPlot widget, but getting following error's.

    In file included from main.cpp:3:
    sampleplot.h:5:22: qwt_plot.h: No such file or directory
    sampleplot.h:7:28: qwt_plot_curve.h: No such file or directory
    sampleplot.h:8:27: qwt_scale_map.h: No such file or directory
    In file included from sampleplot.h:10,
    from main.cpp:3:
    ui_sampleplot.h:30: error: ISO C++ forbids declaration of `QwtPlot' with no type

    ui_sampleplot.h:30: error: expected `;' before '*' token
    ui_sampleplot.h: In member function `void Ui_sampleForm::setupUi(QWidget*)':
    ui_sampleplot.h:54: error: `sampleqwtPlot' was not declared in this scope
    ui_sampleplot.h:54: error: `QwtPlot' has not been declared
    In file included from main.cpp:3:
    sampleplot.h: At global scope:
    sampleplot.h:16: error: expected class-name before ',' token
    sampleplot.h:37: error: ISO C++ forbids declaration of `QwtPlotCurve' with no ty
    pe
    sampleplot.h:37: error: expected `;' before '*' token
    main.cpp: In function `int qMain(int, char**)':
    main.cpp:8: error: 'class samplePlot' has no member named 'show'
    main.cpp:11:2: warning: no newline at end of file
    mingw32-make[1]: *** [release/main.o] Error 1
    mingw32-make[1]: Leaving directory `C:/Shishir/Self Examples/Sample_Plot'
    mingw32-make: *** [release] Error 2
    From this it seems that it is not able to find the qwt files, but all qwt examples are working that means it can find them!!!!

    Can anyone please help me out in this.-->I will be obliged.

    Thanks in advance.
    Last edited by jpn; 11th March 2008 at 19:45. Reason: missing [quote] tags

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qwt examples are working but,Not able to run selfdesigned qwt applications!

    You have to tell the compiler where to look header files and libs for. Did you notice that every .pro file of those Qwt examples includes a .pri file which further adds stuff like INCLUDEPATH and LIBS.
    J-P Nurmi

  3. #3
    Join Date
    Feb 2008
    Posts
    74
    Thanks
    31
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Exclamation Re: Qwt examples are working but,Not able to run selfdesigned qwt applications!

    Hello Jpn,
    Thanks for helping me out, but i knew that all those examples include qwtconfig.pri file from where they get to know all paths. But in my case as i was generating the .pro file with qmake it wasn't including it. So is there any other option to do?

    Anyway now i wrote the .pro file and included them as shown: -
    Qt Code:
    1. //
    2. //.pro file for the sampleplot from where we get to include qwtconfig.pri file eventually to include all the required qwt headers.
    3. //
    4.  
    5. include( ../../../Qt/qwt-5.0.2/examples/examples.pri )
    6.  
    7. # Input
    8. HEADERS += sampleplot.h
    9. FORMS += sampleplot.ui
    10. SOURCES += main.cpp sampleplot.cpp
    To copy to clipboard, switch view to plain text mode 

    But even then its not working. Thanks again for helping.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qwt examples are working but,Not able to run selfdesigned qwt applications!

    No, you can't include Qwt's examples.pri file unless you put your application in the same directory where Qwt examples are. Just add similar lines to your own .pro but with suitable path to Qwt.
    J-P Nurmi

  5. The following user says thank you to jpn for this useful post:

    Krish (12th March 2008)

  6. #5
    Join Date
    Feb 2008
    Posts
    74
    Thanks
    31
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: Qwt examples are working but,Not able to run selfdesigned qwt applications!

    Hey Thanks Jpn all those errors are gone but facing with new problem, i mean i got the .exe but its not working. Showing "encountered problem while launching the application".

  7. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qwt examples are working but,Not able to run selfdesigned qwt applications!

    In other words... it crashes? You might want to use a debugger to find out what's the problem.
    J-P Nurmi

  8. #7
    Join Date
    Mar 2008
    Posts
    46
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qwt examples are working but,Not able to run selfdesigned qwt applications!

    Hi i have the same problem as u. I can run the qwt examples. Can u pls give me a example code on how make a selfdesigned qwt application in VS2005 integrated with Qt4.3.3. I tried so much on the net but in vain. Help. !!!

    Thank You.
    Dhee

  9. #8
    Join Date
    May 2009
    Posts
    1
    Qt products
    Qt4

    Default Re: Qwt examples are working but,Not able to run selfdesigned qwt applications!

    could you please tell me how to write it then, I also have the same problem, thank you

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.