Bonjour,
J'ai installé la librairie qwt-5.2.1 sur fedora 12. Cependant, en voulant l'appeler depuis mon code C++, j'ai l'erreurs suivantes :
essaiPlot.cpp:1:22: erreur: qwt_plot.h : Aucun fichier ou dossier de ce type
essaiPlot.cpp:2:28: erreur: qwt_plot_curve.h : Aucun fichier ou dossier de ce type
essaiPlot.cpp: In function ‘int main()’:
essaiPlot.cpp:6: erreur: ‘QwtPlot’ was not declared in this scope
essaiPlot.cpp:6: erreur: ‘myPlot’ was not declared in this scope
essaiPlot.cpp:6: erreur: expected type-specifier before ‘QwtPlot’
essaiPlot.cpp:6: erreur: expected ‘;’ before ‘QwtPlot’
essaiPlot.cpp:9: erreur: ‘QwtPlotCurve’ was not declared in this scope
essaiPlot.cpp:9: erreur: ‘curve1’ was not declared in this scope
essaiPlot.cpp:9: erreur: expected type-specifier before ‘QwtPlotCurve’
essaiPlot.cpp:9: erreur: expected ‘;’ before ‘QwtPlotCurve’
essaiPlot.cpp:10: erreur: ‘curve2’ was not declared in this scope
essaiPlot.cpp:10: erreur: expected type-specifier before ‘QwtPlotCurve’
essaiPlot.cpp:10: erreur: expected ‘;’ before ‘QwtPlotCurve’
essaiPlot.cpp:13: erreur: expected primary-expression before ‘...’ token
essaiPlot.cpp:14: erreur: expected primary-expression before ‘...’ token
Process terminated with status 1 (0 minutes, 0 seconds)
15 errors, 0 warnings
//j'ai essayé le code se trouvant dans le tutorial fourni dans sourceforge
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
int main()
{
QwtPlot *myPlot = new QwtPlot("Two Curves", parent);
// add curves
QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
QwtPlotCurve *curve2 = new QwtPlotCurve("Curve 2");
// copy the data into the curves
curve1->setData(...);
curve2->setData(...);
curve1->attach(myPlot);
curve2->attach(myPlot);
// finally, refresh the plot
myPlot->replot();
return 0;
}