Visual Studio 08 no Root output

Hi,

Im using Visual Studio 08 on WinXP, and im trying to run the following code:
#include “TROOT.h”
#include “TCanvas.h”
#include

int main()
{
Double_t w = 600;
Double_t h = 600;
TCanvas * c1 = new TCanvas(“c”, “c”, w, h);
}

I have it all set up, the project builds fine, no errors however the output doesnt show up. How do I have to configure my project or VIsual Studio so when I run the code the usual Root Output appears?

thank you for the help,

Laura

Hi Laura,

I slightly adapted your code. It should now do what you were expecting. VS2008 was innocent :wink:

Cheers,

Moritz

/////////////////////////////////////////////////////////////
#include “TROOT.h”
#include “TCanvas.h”
#include “TApplication.h”
#include

int main()
{
Double_t w = 600;
Double_t h = 600;
TApplication* app = new TApplication(“blah”,0,0);
TCanvas * c1 = new TCanvas(“c”, “c”, w, h); //Only generates canvas but does not show it.
app->Run(); // Shows canvas and other stuff. Keeps program running until it gets killed. (Otherwise it would exit right away.)
}

thank you so uch, works just fine :smiley: