Remove stdio redirection

Hi all,

How do I remove the stdio redirection in SDL 2.0? I am compiling SDL into a
static library, and Google sources tell me that there should be a switch to
disable this redirection but I am having trouble locating it. Any tips?

I am using my own main function so am defining SDL_MAIN_HANDLED and not
linking with stdmain

Kind regards,

Philip Bennefall

How do I remove the stdio redirection in SDL 2.0? I am compiling SDL into a
static library, and Google sources tell me that there should be a switch to
disable this redirection but I am having trouble locating it. Any tips?

The redirection code was dropped for SDL 2.0.

If you’re using the Visual C++ runtime libraries, you have to make
sure you only use one version and either the static or the dynamic
one. You’ll run into problems if you create a DLL with a static
runtime library because certain handles are different from the ones
the application will have and its stdout will go into nowhere.

That’s just one specific issue and depends on how you build SDL and your code.