EXE file for SDL-based programs (VISUAL STUDIO 2013) |
MrTAToad
|
Are you supplying all the SDL DLL's with the executable ?
|
|||||||||||
|
Tyzor
|
Do you mean having all the SDL's DLLs being in the same directory?
|
|||||||||||
|
MrTAToad
|
Thats right
|
|||||||||||
|
Tyzor
|
I pasted all the DLL which i was using (in the same folder as the .vcxproj) into the debug folder. It runs the program (yay!) but then the images wouldn't appear. Does this mean i'd need to change the code to show others? I thought there might be a way just to "compress" everything into 1 .exe file.
Thanks for the quick reply! |
|||||||||||
|
MrTAToad
|
Sounds like your pathing is incorrect.
If you just have "image.png" then "image" should be in the same directory as the executable. If its "Media/" then your images should be in "Media", which in turn should be in the same place as your executable. If however, you are using fixed paths ("C:\moo\blah"), then you are being very naughty and need to change that as soon as possible. |
|||||||||||
|
MrTAToad
|
You could load all data from a resource, but, unfortunately that sort of thing is a Windows-only feature.
|
|||||||||||
|
EXE file for SDL-based programs (VISUAL STUDIO 2013) |
Sik
|
Stupid question: you're sending them the data in a ZIP file, right?
Did you make sure they actually extracted the files and didn't run the EXE directly? I know this sounds stupid but Windows makes it really easy to forget (since it opens ZIP files as if they were folders, even though programs can't use them as such) 2014-10-13 10:01 GMT-03:00, MrTAToad:
Beware that this won't work if the current directory isn't the same as the executable directory (this is the reason why SDL_GetBasePath exists). _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Tyzor
|
Right now my images are stored in "Resource Files" (folder i created) which is in the same directory as the .vcprojx file. When i move the "Resource files" folder into the directory of the .exe (/Debug) i'm just struggling with typing the syntax. I tried "Debug/Resource Files/image.png" but that ain't working. Is it possible to provide me with an example on how to type the directory? Code is fine it's just me typing the directory incorrectly.
|
|||||||||||
|
MrTAToad
|
It may be easier to provide the loading part of your code, to see if there is anything wrong with it (like an extra space or something).
|
|||||||||||
|
Tyzor
|
This is based off LazyFoo's. The current code works fine.
I'm not quite sure how to move up 1 folder from the .vcprojx directory and into the debug folder. That might be an issue..Not sure. I just commented out what i attempted (but failed) |
|||||||||||||||
|
MrTAToad
|
That should be fine - have you tried copying Resource Files into the Release directory, in case you are compiling for release mode.
|
|||||||||||
|