Debug using printf

Started by
1 comment, last by rsegal 22 years, 9 months ago
Is it possible to open a dos prompt window to see output from functions like printf using portalib, and if so how might you do that?
Rob Segal - Software Developerrob@sarcasticcoder.com
Advertisement
You can just use AllocConsole() to create a new console window, then to be able to use printf() et al, call freopen( "CONOUT$", "wt", stdout );

War Worlds - A 3D Real-Time Strategy game in development.
This is planned for the next Portalib version (along with everything else in the world I promise

Have a look on flipcode''s tip of the day - they had a recent one (or was it code of the day?)

I''d recommend using the Win32 Console commands if you are Win32 only, because you can do colours and other good stuff.
Cross-platform it is up to you - I''m going to try for a good one across all in its own window. I''ll have to learn a bit of X though for Linux

The on screen one is always good and easy. glColor4f( 1, 1, 1, 0.7f) and write away

~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!

This topic is closed to new replies.

Advertisement