[SDL] Problem with stdout.txt in SDL 1.2.14
micah.brening at gmail.com
Thu Dec 30 09:23:08 PST 2010
You are correct that you can't set it from inside the app. I don't think you can set it when compiling your app either. You have to reconfigure and recompile SDL for that.
If I'm not mistaken, the reason this was done by default was so that, on Windows, it wouldn't pop up a console. Or, I guess if it was compiled as a GUI application, the stdout might as well be > /dev/null. That's all well and good unless you are debugging.
I haven't done a lot of programming and testing on Vista or 7, so I haven't had this problem yet. Seems to me the program should have access to read and write in it's folder. However, I was playing a game that refused to save my progress because it needed to create a save folder which it didn't have permission to do. I had to create it manually. That was on 7.
You might look into using an installer and having it modify the permissions so the program can create and modify in it's folder.
And remember, as long as you are dynamically linking SDL, your end user has the right and the ability to swap for the latest SDL. So while you provide 1.2.13, they may upgrade it to 1.2.14.
> So the latest version 1.2.14 by default creates stdout.txt if the SDL_STDIO_REDIRECT is not set.
> This works fine in some folders, but not when the app is installed in Program Files, where the rights are restricted.
> So it cannot create this file, and when it tries to write into it, it just crashes.
> This is the problem. Setting SDL_STDIO_REDIRECT from inside the app is not possible (and why do I even care?). IMHO, SDL should not redirect stdio by default.
> I will stick with 1.2.13.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL