Hey all. I've been using dev cpp since I switched back to windows, but I can't even get the debugger to watch variables when I tell it to and it's driving my crazy.
I can live without the debugger, but I at least need to be able to print variables to the console. Except that I'm using open GL, and so there isn't one to print things out to! Is there a way to remedy this? Some in-editor console perhaps, or a setting in open GL to change?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One other somewhat related note. As one who has been known
to use old-fashioned print statements as a debugging aid, one
should know that this method can run into problems when the terminal
or the environment caches print statements. The prints can in fact
appear out of order, or not at all unless you do something like
fflush(stdout);
(I think using endl with couts may accomplish the same thing.)
I run into this all of the time with my MinGW/MSYS installation,
which uses rxvt as its terminal.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Set your project type to "Windows Console" rather than "Windows GUI". This will remove the -mwindows build option which suppresses the console window. You will still get a GUI window if your application explicitly creates one (which it must do since that is what you have described), but you will get a console windows as well which accepts standard I/O.
Note that if your project sets the -mwindows option directly rather than by virtue of the project type, you will have to remove that too. You can check the build log to see is -mwindows is being applied anywhere. Do that before posting a log here and saying it does not work!
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey all. I've been using dev cpp since I switched back to windows, but I can't even get the debugger to watch variables when I tell it to and it's driving my crazy.
I can live without the debugger, but I at least need to be able to print variables to the console. Except that I'm using open GL, and so there isn't one to print things out to! Is there a way to remedy this? Some in-editor console perhaps, or a setting in open GL to change?
One other somewhat related note. As one who has been known
to use old-fashioned print statements as a debugging aid, one
should know that this method can run into problems when the terminal
or the environment caches print statements. The prints can in fact
appear out of order, or not at all unless you do something like
fflush(stdout);
(I think using endl with couts may accomplish the same thing.)
I run into this all of the time with my MinGW/MSYS installation,
which uses rxvt as its terminal.
Wayne
Set your project type to "Windows Console" rather than "Windows GUI". This will remove the -mwindows build option which suppresses the console window. You will still get a GUI window if your application explicitly creates one (which it must do since that is what you have described), but you will get a console windows as well which accepts standard I/O.
Note that if your project sets the -mwindows option directly rather than by virtue of the project type, you will have to remove that too. You can check the build log to see is -mwindows is being applied anywhere. Do that before posting a log here and saying it does not work!
Clifford