1 Attachment(s)
Qwt build error in VS2015
I am getting the following error:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cp pBuild.targets(1189,5): warning MSB8012: TargetPath(D:\DAN\QWT\QwtPjts\SimplePlot\SimplePlo t\debug\Simple.exe) does not match the Linker's OutputFile property value (D:\DAN\QWT\QwtPjts\SimplePlot\SimplePlot\debug\Si mplePlot.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cp pBuild.targets(1191,5): warning MSB8012: TargetName(Simple) does not match the Linker's OutputFile property value (SimplePlot). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
while building main.cpp in VS2015.
main.cpp:
#include <qapplication.h>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include <qwt_plot_grid.h>
#include <qwt_symbol.h>
#include <qwt_legend.h>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QwtPlot plot;
plot.setTitle("Plot Demo");
plot.setCanvasBackground(Qt::white);
plot.setAxisScale(QwtPlot::yLeft, 0.0, 10.0);
plot.insertLegend(new QwtLegend());
QwtPlotGrid *grid = new QwtPlotGrid();
grid->attach(&plot);
QwtPlotCurve *curve = new QwtPlotCurve();
curve->setTitle("Some Points");
curve->setPen(Qt::blue, 4),
curve->setRenderHint(QwtPlotItem::RenderAntialiased, true);
QwtSymbol *symbol = new QwtSymbol(QwtSymbol::Ellipse,
QBrush(Qt::yellow), QPen(Qt::red, 2), QSize(8, 8));
curve->setSymbol(symbol);
QPolygonF points;
points << QPointF(0.0, 4.4) << QPointF(1.0, 3.0)
<< QPointF(2.0, 4.5) << QPointF(3.0, 6.8)
<< QPointF(4.0, 7.9) << QPointF(5.0, 7.1);
curve->setSamples(points);
curve->attach(&plot);
plot.resize(600, 400);
plot.show();
return a.exec();
}
Re: Qwt build error in VS2015
Hi, this is a problem with the setup of your Visual Studio. You can modify the name of generated exe file in two locations, but they have to match, otherwise you get the error you described.
In the properties of your project check "Linker -> Common -> Output File" and "Common -> Destination name" (not sure if I got the correct names, I had to translate my german GUI).
Ginsengelf