SDL keeps stopping my console from printing

Discussion about everything. New games, 3d math, development tips...
Post Reply
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

SDL keeps stopping my console from printing

Post by 3DModelerMan »

How can I actually stop SDL from diverting my entire log to stdout.txt instead of the console window?. Any quick hackish fixes?.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
ebe
Posts: 4
Joined: Sun Nov 02, 2008 10:02 pm

Post by ebe »

maybe try this

Code: Select all

freopen ("log.txt","w",stdout);
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

nope

Post by 3DModelerMan »

Nop did'nt work.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
ebe
Posts: 4
Joined: Sun Nov 02, 2008 10:02 pm

Post by ebe »

sorry i missunderstood you :oops:

if you want redirect it back to console try something like that

Code: Select all

#include<stdio.h>

main()
{
freopen("stdout.txt", "w", stdout);
printf("file\n");

fclose(stdout);

fdopen(2,"w");
printf("console\n");
}
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

thanks

Post by 3DModelerMan »

Thanks for the help.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Post Reply