troubles

Started by
2 comments, last by Rafael_Treiber 16 years, 11 months ago
Hello all. I am having some troubles using SDL along with Visual Studio Express edition 2005 and as I didnt find any topics related to my problem in my search, I decided to post it here. Here is the situation: I created a game using SDL and the Microsoft Visual Studio Express edition 2005 compiler. It works fine and I get no error messages here. The code is basically making a man walk across the screen. As it is working fine, I decided to send it to my friends. So I sent it to one of them and it worked fine for him too. But he is a programmer too and he says he has SDL on his computer too. So I sent it to another friend of mine and it didnt work there, It just open and closes imediatly. So I sent it to my sister and she had the same problem. And I sent to another guy and he had the same problem. As the game is running OK here on my machine and it worked fine on another machine with SDL too, I can assume that it is some file missing. But I dont know which one. I know that along with my game I have to send SDL.dll and SDL_image.dll too. But even if you do not send them, the program asks for them on opening. And there is no error message. No asking for any file. It just opens and close. So I created a log in the code to see what is causing this and I saw that it was the image loading. If it cant open the image, it returns 1 and the program exits. But why wont it load the images? I am sure it is not the code because it works fine here and on the other friend I told. And some other friend of mine told me to use a program to see what dlls my game needs. I executed it and it showed me that I need SDL.dll, SDL_image.dll, msvcr80.dll and msvcp80.dll. But even sending all these dlls, the game wont run. And yes, the images are on the same directory of the exe file that I sent them. It is the second time that I have these incompatibility troubles. Any help would be welcome.
Advertisement
Any clues?
You probably just need to distribute it with SDL.dll (and, depending on what you use, SDL_Image.dll, SDL_ttf.dll, and so on). If it sits in the same directory as the game exe, it should work.

Also, try running the game from the command line instead of double-clicking on it - the error message might be helpful (though it's probably some segfault). Shame on you for not producing meaningful error messages on initialization issues :-).
Quote:Original post by Replicon
You probably just need to distribute it with SDL.dll (and, depending on what you use, SDL_Image.dll, SDL_ttf.dll, and so on). If it sits in the same directory as the game exe, it should work.

Also, try running the game from the command line instead of double-clicking on it - the error message might be helpful (though it's probably some segfault). Shame on you for not producing meaningful error messages on initialization issues :-).


Yes, they are on the same directory as I told before.
Unfortunatelly I can't run from command line here because it will work. It is working here so they should run it from command line. And unfortunatelly I depend on they good will for this.
I did produce an error message, and as I told it is "Error on loading images". But I didnt use SDL_Geterror() because I am just learning SDL and I didn't know about it till now.
But what you mean by segfault? What could cause it? Could it happen just on some computers?
Thanks for the reply.

This topic is closed to new replies.

Advertisement