Jump to content
  • Advertisement
Sign in to follow this  
ReclusiveManiac

Help installing SDL on Dev-C++ Please Only getting a flash of the screen

This topic is 3814 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

I am trying to install SDL on computer using Dev-C++. I installed the lastest version of Dev-C++ on the website. I am following Lazy foo's website guidlines to download it. I downloaded the files from the website. I then copied the contents of the lib folder into the dev lib folder, the contents of the bin folder into the dev bin folder, and the same with include. I also extracted the sdl.dll to c/windows/system32 I then created a windows project and pasted a piece of code from lazy foo's website in the linker area. I have tried to compile and run applications, but they just show up and go away in the blink of an eye. I will be responding to this thread so please give me any advice you have. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Sounds like you don't have a program loop. The window is opening up, then immediately closes as the program exits.

Share this post


Link to post
Share on other sites
Download newest non-beta version of Dev-C++.
Tools->Check for updates, download newest version of SDL through that and install.
Go to libsdl.org and make sure you download the newest sdl.dll and place it in your system32 folder (devc++ might do this for you, might not).
Retry doing what Lazy-Foo wants you to do (Im not sure if this is what he told you to do or not, just making sure, because its teh "right" way). Be sure to make sure you are linking what you need to link. If it doesnt work, check cout.txt (or whatever its called) for the error message, and post your code.

happy hunting.

Share this post


Link to post
Share on other sites
There is nothing wrong. You just do not have a loop but in LazyFoo's tutorials they don't add in the loop until the next lesson. It is because the code you copied is just to make sure SDL compiles with no warnings. Copy the code from the next lesson and you will see that the screen will not flash.

Share this post


Link to post
Share on other sites
I think it is because I am using the beta version. I have used his second lesson and the same thing happens. I tried with a SDL book as well. I will try getting the non-beta version.

Share this post


Link to post
Share on other sites
Okay, so I tried your suggestion and it didn't work... Would anyone mind giving me step by step directions on how to install dev-c++ and get SDL working on it? I would appreciate it a lot. When I downloaded the non-beta version of dev-c++, it wouldn't let me get to the updates. It said the server was down. So I installed SDL on the new version of dev-c++ and did the sdl.dll thing to windows, but it still only flashes for a second on an excercise that should stay open until I close it.

Share this post


Link to post
Share on other sites
Quote:
Original post by ReclusiveManiac
I fixed everything now. I finally got it working right. Thanks for all of your help guys.


Mind telling us what you did, so others can learn from it?

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!