[SDL] annoying stdio redirect
Paulo Pinto
pjmlp at progtools.org
Thu Jul 12 05:47:43 PDT 2007
Hi,
if I'm not mistaken, SDL_main() is the one to blame for the
redirection.
You should use a different device, CON won't work.
Check
http://comsci.liu.edu/~murali/win32gui/Win32Apps.htm
http://msdn2.microsoft.com/en-us/library/ms682073.aspx
Cheers,
Paulo
Quoting Michael Summers <wfrobozz at gmail.com>:
> Hi,
>
> I've been trying to code up a small tech demo for geometry shaders for the
> past
> few hours, but I'm running into a bit of a snag. The program is supposed to
> be
> command-line and I'd like stdio to not redirect into a text file but rather
> into
> the current command prompt.
>
> So I tried using freopen("CON", "wb", stdout). It didn't redirect to
> stdout.txt,
> but it didn't use the command prompt either. Then I tried compiling from
> scratch
> with --disable-stdio-redirect passed to configure. Once again, didn't it
> didn't
> use stdio.txt, but it didn't use the command prompt either.
>
> Commenting out everything related to SDL and the #include <SDL.h> part
> restores
> output to the command prompt though. :(
>
> Source code: http://www.nomorepasting.com/getpaste.php?pasteid=1305
>
> Any ideas?
> Michael Summers
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the SDL
mailing list