Window Keeps Closing

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
KarneeKarnay
Posts: 8
Joined: Mon Dec 19, 2011 3:48 pm

Window Keeps Closing

Post by KarneeKarnay »

I'm currently trying to do the first tutorial available in the tutorial section. I've set up and installed all the other libraries and I've copied the main.cpp file into a new project.

When I try to run it the window and console open, but both close immediately. I've tried editing the code and running it through Debugging and without, but the problem remains. Any help?

I'm using VS2010.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Window Keeps Closing

Post by CuteAlien »

Irrlicht comes with tutorials + project files for those. Look in the examples folder and try those.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
eejin
Posts: 97
Joined: Sun Jul 24, 2011 11:50 am

Re: Window Keeps Closing

Post by eejin »

I had that problem too and it seems that you would need to change the (erhmmm whats it called again).
Like if you use code blocks change directx to opengl.
KarneeKarnay
Posts: 8
Joined: Mon Dec 19, 2011 3:48 pm

Re: Window Keeps Closing

Post by KarneeKarnay »

CuteAlien wrote:Irrlicht comes with tutorials + project files for those. Look in the examples folder and try those.
I can't find anything in the folder for that example. I've probably missed something so I'll have another look.
eejin wrote:I had that problem too and it seems that you would need to change the (erhmmm whats it called again).
Like if you use code blocks change directx to opengl.
Haven't a clue sorry. :(
smso
Posts: 246
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: Window Keeps Closing

Post by smso »

Try inserting printf statements before, inside and after the run loop of irrlicht:

Code: Select all

...
printf("BEFORE run\n");
while(device->run())
{
    ...
    printf("RUNNING\n");
}
...
printf("END run\n");
KarneeKarnay
Posts: 8
Joined: Mon Dec 19, 2011 3:48 pm

Re: Window Keeps Closing

Post by KarneeKarnay »

I pasted the code in but no luck. If I refuse to debug the Console appears , but like before the window appears and closes almost immediately.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Window Keeps Closing

Post by CuteAlien »

The first example is in examples/01.HelloWorld.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Window Keeps Closing

Post by mongoose7 »

You can open a command window and change to the directory where the app is. After you run the app, the window stays open and you can see your error.
Post Reply