fatal error LNK1104: cannot open file 'C:\Users\admin\Documents\Visual.obj'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • curious2007
    New Member
    • Jun 2007
    • 71

    fatal error LNK1104: cannot open file 'C:\Users\admin\Documents\Visual.obj'

    [HTML]#include "chartdir.h "

    int main(int argc, char *argv[])
    {
    // The data for the bar chart
    double data[] = {85, 156, 179.5, 211, 123};

    // The labels for the bar chart
    const char *labels[] = {"Mon", "Tue", "Wed", "Thu", "Fri"};

    // Create a XYChart object of size 250 x 250 pixels
    XYChart *c = new XYChart(250, 250);

    // Set the plotarea at (30, 20) and of size 200 x 200 pixels
    c->setPlotArea(30 , 20, 200, 200);

    // Add a bar chart layer using the given data
    c->addBarLayer(Do ubleArray(data, sizeof(data)/sizeof(data[0])));

    // Set the labels on the x axis.

    c->xAxis()->setLabels(Stri ngArray(labels, sizeof(labels)/sizeof(labels[0])));

    // output the chart
    c->makeChart("sim plebar.png");

    //free up resources
    delete c;
    return 0;
    }[/HTML]


    This code gives me the following error:

    1>Linking...
    1>LINK : fatal error LNK1104: cannot open file 'C:\Users\admin \Documents\Visu al.obj'

    I have checked this and I do not have a Visual.obj file in my Documents folder. This might be the cause of this problem. If so how can I get this file?
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    I assume this is a Win32 Console Application??

    Comment

    • curious2007
      New Member
      • Jun 2007
      • 71

      #3
      Ok, you are right. This code is supposed to draw charts so probably it is not a console application. How can I handle this? Thanks.

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        You will need to write a Windows program using a Win32 project or use the .NET Framework.

        Comment

        Working...