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

Started by
6 comments, last by gharen2 16 years, 3 months ago
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
Advertisement
Sounds like you don't have a program loop. The window is opening up, then immediately closes as the program exits.
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.
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.
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.
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.
I fixed everything now. I finally got it working right. Thanks for all of your help guys.
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?

This topic is closed to new replies.

Advertisement