Why SDL window only show up for a second and the disappear

Started by
5 comments, last by anyegongjue 15 years, 10 months ago
Hi Guys, I am new to SDL. During the study, I have one problem. I run the source code which I download from some online tutorials in vs2005 on Vista sys. The SDL window only appear for a second and then disappear. So can you guys help me with this? Thank you very much!
Advertisement
What is the code? Does it include some kind of loop to keep the program running?
If you don’t show the code or post the link to the tutorial we can’t help you.
Sorry about forget the code. I download the code here.

http://www.sdltutorials.com/tutorials/sdl-events.rar

That's a good tutorial I think. The code is really simple.

Thank you so much!
Please help me. I really have no idea about this.

I even tried to compile the .dll and .lib files from the source code under vs2005, and then re-link them to the program. But it still didn't work.

Is there anyone who also use vs2005 to build SDL program?

Please help me. Thank you!!!
Does it work from outside VS? VS does this wonky thing with paths when you run it from within the IDE, you have to set your debugging path in the project settings to the path with your data. You are probably seg faulting because the images are not being loaded correctly.
Hi Portmanteau,

You are right. How stupid I am!

In vs2005, there is a debug folder under the solution folder, and all the output file are put there include the .exe file. So I think all the related things should be put there. Because the modules which lib3ds needs are put there.

But when I move the images to the working folder(under project folder), it works!
I don't know what to say, but I think maybe it's time for me to make a change towards Linux. HaHa!

Thank you for replying my topic and you really help me a lot!

This topic is closed to new replies.

Advertisement