Non-batch mode of compiled code

Hi,
I compiled my c++ code using root libs. In the code I used

graph->Draw();

etc. If it is in ROOT environment, a pad will show. However, if I run my execute, it is in the batch mode. How can I run the execute in a non-batch mode (ie having root windows showing up).

Thanks,
Zhiyi.

After drawing, add something like: gPad->Update; sleep(10); // wait 10 seconds

Thanks. But I didn’t really mean that.

Just find the solution:

I need to create TApplication object first.