SDL help
Moderator: Coders of Rage
Re: SDL help
I ran the actual exe file and it did not crash but it only printed two balls on the screen then it closed instead of waiting for me to close it. It still does not work from the IDE which is Visual Studio and SDL_GetError still gives me cannot open ball.bmp.
Re: SDL help
I put in the exact path of the bmp and fixed the thing that was making it quit after putting two balls on the screen. Is there any other way to do that besides put the exact path because if a wanted to distribute something then the path would be different.
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: SDL help
It sounds like you may not be putting them in the correct path. If you're using Visual Studio the project folder usually contains a "bin" folder which in turn contains a "debug" and a "release" folder. Those are likely the .exes that are running, and they need to have ball.bmp in their path(s) as well.herby490 wrote:I put in the exact path of the bmp and fixed the thing that was making it quit after putting two balls on the screen. Is there any other way to do that besides put the exact path because if a wanted to distribute something then the path would be different.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
Re: SDL help
Visual Studio does not have a bin folder. In the project folder it has a Debug, Release, and a test folder(Test is the name of the application). In the Debug and Release folders there is the exe and that is also where I put the ball.bmp. In the test folder there is another Debug and Release folder but these folders do not have the exe but instead have the object file and manifest file and so on.
- Maevik
- Chaos Rift Junior
- Posts: 230
- Joined: Mon Mar 02, 2009 3:22 pm
- Current Project: www.keedepictions.com/Pewpew/
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: Long Beach, CA
Re: SDL help
Thanks that works. If I wanted to distribute an application I made where would I put it.
Re: SDL help
In the same folder you put the exe in.herby490 wrote:Thanks that works. If I wanted to distribute an application I made where would I put it.
Re: SDL help
Thanks hopefully everything will work with SDL now.
- Maevik
- Chaos Rift Junior
- Posts: 230
- Joined: Mon Mar 02, 2009 3:22 pm
- Current Project: www.keedepictions.com/Pewpew/
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: Long Beach, CA
Re: SDL help
You can also clean up the root directory by putting them in a folder. In your code you would need to change the opening function call to something like
example.open( "files//ball.bmp" );
where files is a folder in your root directory.
example.open( "files//ball.bmp" );
where files is a folder in your root directory.
My love is like a Haddoken, it's downright fierce!
Re: SDL help
If I put the code in a sub folder of something I am distributing will it work?