[SDL] Console instead of stderr/stdout

Started by
1 comment, last by Decrius 16 years, 2 months ago
Hi, SDL seems to create stderr and stdout files. Can I set that it won't create those files when running? Also: how can I use std::cout and std::cin together with SDL, it seems that every output goes to the stdout file instead of to the console. How can I fix this? Running WinXP, CodeBlocks and MingW. Programming in C++
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Advertisement
Compile your application as a console application rather than a windows application.
Yeah tried that already, but it seems that SDLmain has set that output should go to these files instead of to the console.

This can be avoided though with putting the following after SDL_Init():

freopen("CON", "w", stdout);
freopen("CON", "w", stderr);

However, this is a bit buggy, so I decided to use SDL_ttf instead ;).

Thank you anyways
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora

This topic is closed to new replies.

Advertisement