• Welcome to Dark Bit Factory & Gravity.
 

Console window on Linux/C++

Started by nawitus, February 02, 2009

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

nawitus

Hi', I'm coding an OpenGL library using C++ in Ubuntu 8.10 and using the Geany IDE 0.14. If I run the program for terminal for example, cout is not printing anything to there.. I really need a console window to debug some stuff like FPS information while I'm running the program.

My compile argument is: (not sure if this is relevant..)
g++ -Wall -c "%f" -lSDL `sdl-config â€"cflags â€"libs` -lSDL_ttf -lSDL_gfx -lSDL_mixer -lGL -lGLU -lGLEW


JL235

A bunch of random ideas:

QuoteIf I run the program for terminal for example
When you say 'for terminal' do you mean your running it from a terminal or from Geany IDE with some terminal mode? If your running it from the IDE try going to the program manually in a terminal and run it from there. It might be that the IDE is redirecting the output to somewhere.

If you compile a 'hello world' program, does this print correctly to the terminal?

Are you doing any redirection of the standard output in the program (i.e. it could be a bug that you've added)?
Play My Code - build games in your browser!

Jim

More random ideas.  Can you check the value of stdout?  Is your program finishing before the output is flushed to the console?

Jim
Challenge Trophies Won:

nawitus

It's fixed now. Turns out an update to Geany breaks building projects, described here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479795