Results 1 to 2 of 2

Thread: Qwt build error in VS2015

  1. #1
    Join Date
    Jan 2020
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Default 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();
    }
    Attached Files Attached Files
    Last edited by dan1973; 21st January 2020 at 10:55. Reason: updated contents

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    503
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default 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

Similar Threads

  1. Can't find QElapsedTimer in VS2015
    By CodeSlapper in forum Qt Programming
    Replies: 3
    Last Post: 30th November 2017, 00:41
  2. Qt Static Build - Build error g++
    By dan3460 in forum Qt Programming
    Replies: 1
    Last Post: 6th September 2017, 10:19
  3. How to compile Qt 5.8 statically with PostgreSQL plugin in VS2015
    By moabi in forum Installation and Deployment
    Replies: 0
    Last Post: 20th March 2017, 08:17
  4. Replies: 14
    Last Post: 2nd August 2015, 23:07
  5. Vs2015
    By Alundra in forum Qt Programming
    Replies: 1
    Last Post: 30th July 2015, 11:43

Tags for this Thread

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.