Page 1 of 1

why Window disappears when i start executing?

Posted: Wed Apr 11, 2012 7:17 am
by chaiein
The helloworld program weh executed in visual studio c++ 2008 it works well but I created new project win32 console application with different name and location, with the main.cpp code as in Helloworld I cannot see the output because window disappears immediately. I have copied irrlicht.dll to the project location.
What should i do to make window not to disappear and why it happening so?

Re: why Window disappears when i start executing?

Posted: Wed Apr 11, 2012 7:30 am
by utunnels
It is possible the project has different setting with your previous one. For example, if you run the application in visual studio, check the working directory in the project properties tab, that is where your dll should be located.

Re: why Window disappears when i start executing?

Posted: Wed Apr 11, 2012 8:13 am
by chaiein
I am not getting any warning about dll but window disappear I checked the properties with helloworld but still problem exist.

Re: why Window disappears when i start executing?

Posted: Wed Apr 11, 2012 8:16 am
by chaiein
I created the project in the following procedure in visual studio c++ 2008
new->project->vc++ project->win32 console application.
Is this procedure correct?

Re: why Window disappears when i start executing?

Posted: Wed Apr 11, 2012 8:18 am
by utunnels
OK, then it is the model file.

IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");

You should place that in correct location if you haven't modified the path.

Re: why Window disappears when i start executing?

Posted: Wed Apr 11, 2012 8:30 am
by chaiein
Ya thats exactly where i had problem. Now it works fine. Thank you so much:)

Re: why Window disappears when i start executing?

Posted: Wed Apr 11, 2012 10:26 am
by chaiein
now i got same probelm of closing window without opening the command prompt to take input from user as in quake3. what should i do ?

Re: why Window disappears when i start executing?

Posted: Mon May 28, 2012 4:07 pm
by byllgrim
utunnels wrote:OK, then it is the model file.

IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");

You should place that in correct location if you haven't modified the path.
It works for me if I change it to

IAnimatedMesh* mesh = smgr->getMesh("D:\irrlicht-1.7.3/media/sydney.md2");

How can I edit the settings so that I wont have to do that?

Re: why Window disappears when i start executing?

Posted: Mon May 28, 2012 4:10 pm
by CuteAlien
byllgrim: Which IDE? What are you doing exactly?

Re: why Window disappears when i start executing?

Posted: Mon May 28, 2012 5:43 pm
by byllgrim
I am trying to run the hello world tutorial using visual studio 2010. The code is correct because I have tried to copy it from the examples and coping from the tutorial page. Either if I start an ampty project or a console application, the program will compile, run, open up a window and immediately close. I have set the path to include and library. The problem is that it wont recognize where this is ---> ("../../media/sydney.md2");
so i have to type in this ---> ("D:\irrlicht-1.7.3/media/sydney.md2");
I guess there is some way to set a path so it will find the media folder or perhaps I have to move the media files to the project folder, but I don't know how to do this.

Re: why Window disappears when i start executing?

Posted: Mon May 28, 2012 10:21 pm
by CuteAlien
Yes, there is a setting in VisualStudio properties for the project. If you use the project files coming with Irrlicht examples it's set already. I'm not on Windows right now, so not 100% certain how the setting is called. It's in the project settings and probably in the common section - most likely it's called working directory (or maybe executable directory or debug directory) ... any name that sounds a little bit like that.

Edit: Not in the general settings, it's in Configuration Properties - Debugging in VS2010