Problem with SDL!

Hello everybody i am having a problem with SDL, when i compile and run my game with the IDE it works just perfect, but when i ty to run the .exe aplication, it apear a black screen for 1 sec and then it crash! i am using Dev-C++ as IDE, i added al the DLL's to the file
please Help!!!
Last edited on
Does it give any error messages if you run it from the command line?
In dev c++ is not nesesary to use the command line, is the exe failing!
The IDE often uses some other working directory than what will be used when you run the program from outside. I just thought that it might be that the program can't find some DLL file or some other data file that your program uses. If you just double click on the program you don't see any error messages.

I forgot you use Windows. For some reason SDL redirects all output to file so running the program from the command line will not work. You could try to look for the files stdout.txt and stderr.txt in the same directory as the executable. I think the program automatically removes the files when the program ends so it can be hard to view them.

Are your DLL files in the same directory as the executable file? Is the relative paths to the data files relative to the directory of the executable?
yes the stdout.txt and stderr.txt files appear and disapear in just 1 second!!!i tried to see them but is imposible!, it doesnt give me any errors, and the dlls are there, if i take the dlls out it give me error but i have them in the file so it just crash, and the 2 txt files appear and dissaper in 1 sec, but i can use SDL_Delay???
closed account (zwA4jE8b)
If you have no loop then the program is probably just exiting. Do you have a loop that handles input or anything for that matter?

1
2
3
4
5
6
7
8
9
10
quit = false;

While (!quit)
{
  do stuff
  if(condition)
   quit = true;
}

SDL_Quit();
Last edited on
Topic archived. No new replies allowed.