Since rebuilding PC back to same original spec [XP Pro with SP2] I have experienced that when running projects in devcpp that the console now no longer remains open to display results, have fixed this programmatically by inserting system ("pause") into the code, however this is not the permanent solution I am looking for. My previous version of devcpp [4.9.8.3] had an option to toggle that console remained visible [Tools/Environment Options] however this no longer works and I do not see this config option available in version 4.9.9.2 of devcpp that I am currently running. Any ideas?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Clifford, of the 3 alternatives presented the NDEBUG solution meets current criteria the best, however it always nice to have other options to consider and the input from your experience is appreciated. At least now I can continue using the program and see the results displayed.
Stuart
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was not aware that 4.9.8.3 had that option. 4.9.9.2. definitely does not. A number of solutions are possible.
1)
if !defined NDEBUG
system( "pause" ) ;
endif
Then debug builds will pause, but released builds will not.
2) Use the Tools|Configure tools... menu to launch your program via cmd.exe setting:
Title: Run in Console
Program: C:\WINDOWS\SYSTEM32\CMD.EXE
Working directory: <EXEPATH>
Parameters: /K <EXENAME>
Unfortunately there is no tools macro for the parameters list set on the execute menu, so you have to add those as necessary to the configuration after <EXENAME>
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since rebuilding PC back to same original spec [XP Pro with SP2] I have experienced that when running projects in devcpp that the console now no longer remains open to display results, have fixed this programmatically by inserting system ("pause") into the code, however this is not the permanent solution I am looking for. My previous version of devcpp [4.9.8.3] had an option to toggle that console remained visible [Tools/Environment Options] however this no longer works and I do not see this config option available in version 4.9.9.2 of devcpp that I am currently running. Any ideas?
Hi Clifford, of the 3 alternatives presented the NDEBUG solution meets current criteria the best, however it always nice to have other options to consider and the input from your experience is appreciated. At least now I can continue using the program and see the results displayed.
Stuart
I was not aware that 4.9.8.3 had that option. 4.9.9.2. definitely does not. A number of solutions are possible.
1)
if !defined NDEBUG
system( "pause" ) ;
endif
Then debug builds will pause, but released builds will not.
2) Use the Tools|Configure tools... menu to launch your program via cmd.exe setting:
Title: Run in Console
Program: C:\WINDOWS\SYSTEM32\CMD.EXE
Working directory: <EXEPATH>
Parameters: /K <EXENAME>
Unfortunately there is no tools macro for the parameters list set on the execute menu, so you have to add those as necessary to the configuration after <EXENAME>
Clifford
.... 3)
Like (2) but instead of running cmd.exe create a batch file c:\dev-cpp\run.bat containing:
%1 %2 %3 %4 %5 %6 %7 &8 %9
pause
and the replace C:\WINDOWS\SYSTEM32\CMD.EXE in the configuration with c:\dev-cpp\run.bat
%1 will be replaced with <EXENAME> and up to eight command line parameters may follow.
Doing this will give you a "Press any key to continue..." message, so you don't have to close the window or type exit.
Clifford