Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All tests should use SDL_Log or SDLTest_Log in favor of printf/frprintf to enable console output on Windows builds #1019

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments


Copy link

@SDLBugzilla SDLBugzilla commented Feb 10, 2021

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.0
Reported for operating system, platform: Windows 7, x86

Comments on the original bug report:

On 2013-08-13 22:37:24 +0000, Andreas Schiffler wrote:

Created attachment 1285
printf usage in test code

On 8/13/2013 10:15 AM, George Brink wrote:

Second problem.
All tests are compiled with -mwindows key, even those which are supposed to be a console applications. So no stdout/stderr is available and all printf()/frprintf(stderr) are going to nul.
Manual recompilation without -mwindows key solves the problem.

All the printf's should be converted to SDL_Log or SDLTest_Log calls which will go through the platform specific SDL output routine which will attach the console streams on windows if available.

Changes needed are:
$ grep printf *.[ch] | grep -v SDL_snprintf | grep -v SDL_vsnprintf | grep -v "Binary file" >test-printfs.txt

On 2013-08-14 02:39:48 +0000, Sam Lantinga wrote:


On 2013-08-14 12:01:04 +0000, Andreas Schiffler wrote:

Working on it (nice and easy project).

On 2013-08-15 02:32:51 +0000, Andreas Schiffler wrote:

Fixed with:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

1 participant