Results 1 to 2 of 2

Thread: problem when trying to compile it.

  1. #1
    Join Date
    Aug 2008
    Posts
    52
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default problem when trying to compile it.

    hi all,

    i am trying to compile the following code but I receive an error "launch failed. Binary not found". I am using eclipse. The strange think is that the first time I am trying to compile it it is finding errors. But when I try to change the error and compile it again i receive the error. I tried to clean the project but with no result. I think the code is correct.

    Many thanks in advance,

    Kindest regards,
    Christos

    Qt Code:
    1. #include "test2.h"
    2. #include "/usr/include/qwt/qwt_plot.h"
    3. #include "/usr/include/qwt/qwt_plot_curve.h"
    4. test2::test2(QWidget *parent)
    5. : QMainWindow(parent)
    6. {
    7. ui.setupUi(this);
    8. QwtPlot *myPlot;
    9. double x[100], y1[100], y2[100]; // x and y values
    10.  
    11. myPlot = new QwtPlot(this);
    12.  
    13. // add curves
    14. QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
    15. QwtPlotCurve *curve2 = new QwtPlotCurve("Curve 2");
    16.  
    17. for( int i=0; i<100; i++ )
    18. { x[i] = (double)i/50.0; y1[i] = sin(x[i]); y2[i] = cos(x[i]); }
    19.  
    20. // copy the data into the curves
    21. curve1->setData(x, y1, 100);
    22. curve2->setData(x, y2, 100);
    23. curve1->attach(myPlot);
    24. curve2->attach(myPlot);
    25. // finally, refresh the plot
    26. myPlot->replot();
    27. }
    To copy to clipboard, switch view to plain text mode 

  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: problem when trying to compile it.

    Did you implement main() somewhere?
    J-P Nurmi

Similar Threads

  1. Problem compile example in windows
    By walito in forum Newbie
    Replies: 3
    Last Post: 10th December 2008, 21:41
  2. Problem compile QT embedded 3.3.6
    By webquinty in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 27th June 2008, 08:55
  3. qtgui4.dll error in visual c++ 2005
    By Comptrol in forum Installation and Deployment
    Replies: 33
    Last Post: 19th June 2008, 07:18
  4. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02
  5. Qwt plot problem on compile
    By sincnarf in forum Qwt
    Replies: 2
    Last Post: 14th October 2007, 11:36

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.