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