Jump to content
  • Advertisement
Sign in to follow this  
anyegongjue

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

This topic is 3769 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
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!

Share this post


Link to post
Share on other sites
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!!!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!