Im struggeling with hello world Prodject

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
Marinus
Posts: 1
Joined: Fri Feb 25, 2011 9:53 am

Im struggeling with hello world Prodject

Post by Marinus »

Ok the problem is i run the helloworld without a problem :)

But the problem is it show the Device window for 1 seconds and the the execution of program stops

Everthing works without a problem , but the window just dispears after a second .

Also i cant see the lady on the screen or the statictext

Any info on that ??
Learning C++
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

It sounds like you forgot to add a drawing loop to your application
CuteAlien
Admin
Posts: 9718
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Did you modify the example in any way?
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
Mindl
Posts: 16
Joined: Wed Jun 30, 2004 1:42 am

Post by Mindl »

I'm having this problem as well when I compile the Hello World demo. The pre-compiled demo works as it should. Also when I run a debug on the source it works fine. Only doesn't when I compile and try to run on its own.
CuteAlien
Admin
Posts: 9718
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I'm still not sure what exactly you guys are doing. The following information would help us to help you:
- Operating System (windows or linux)
- IDE (for example Code::Blocks or Visual Studio)
- Do you use provided project files which come with the examples or do you try to create your own project
- Are you using unmodified example sources. Or if not - please post what you are using instead.
- Do you get any comler or linker errors. Or any runtime warnings in the console output? (You can also start from console (dosbox for example) so output doesn't vanish when the application exits too fast to read anything).
- Do you start from within the IDE or directly the .exe? (And does it change when you do that the other way?)
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
blAaarg
Posts: 94
Joined: Tue Mar 02, 2010 9:11 pm
Location: SoCal

Post by blAaarg »

There are a couple of places in the unmodified helloworld.cpp that test to make sure a resource was loaded properly and if not it doesn't try to "robustly" handle the error, but rather, "fails gracefully". In particular...

Code: Select all

	IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
	if (!mesh)
	{
		device->drop();
		return 1;
	}
	IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
...would allow your program to compile, bring up a window, not show the "lady" [although I'm not sure you could call anyone who dresses like that a "lady" :twisted: ] and then just simply close/terminate the program if for some reason it failed to find sydney's path, i.e. "../../media/sydney.md2".

Did you install Irrlicht to a non-standard location? Because if so, you'll need to change the "../.. " part of the path before "media/sydney.md2" to something else.
"Computers don't make mistakes! What they do they do on purpose!!"

-Dale Gribble
Mindl
Posts: 16
Joined: Wed Jun 30, 2004 1:42 am

Post by Mindl »

blAaarg wrote:There are a couple of places in the unmodified helloworld.cpp that test to make sure a resource was loaded properly and if not it doesn't try to "robustly" handle the error, but rather, "fails gracefully". In particular...

Code: Select all

	IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
	if (!mesh)
	{
		device->drop();
		return 1;
	}
	IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
...would allow your program to compile, bring up a window, not show the "lady" [although I'm not sure you could call anyone who dresses like that a "lady" :twisted: ] and then just simply close/terminate the program if for some reason it failed to find sydney's path, i.e. "../../media/sydney.md2".

Did you install Irrlicht to a non-standard location? Because if so, you'll need to change the "../.. " part of the path before "media/sydney.md2" to something else.
This is what the issue was. Thanks.
Post Reply