Page 2 of 2
Posted: Thu Aug 09, 2007 10:42 am
by Nik
Well it inherently against the principles of Linux and Unix in general so, better not.
You could use a script though or one could integrate a console in the IDE...
Posted: Thu Aug 09, 2007 1:39 pm
by freak
Well, it is actually Windows which is very weird in its handling of the console, not the other OS.
(You have to create a special "Console" exe if you want to run it from cmd.exe,
but then you always get a weird console window when running from GUI, which sucks)
The terminal on Linux is a separate program. Trying to hack something together
to automatically open one would create dependancies on the specific terminal
program in question which is very bad since there are tons of different ones out there.
Also this would mean that you cannot write console programs anymore that
can run without any GUI system because of the terminal dependancies.
For debugging from the IDE, you can select the "Console" executable type
in the Compiler Options. In this case the IDE will open a console for you
and run the program inside it. It will have no effect on created executables though.
Posted: Thu Aug 09, 2007 2:54 pm
by Nik
Is there some kind of GTK Terminal widgets, so there is an easy way to emped a terminal? Then one could simply let the program be it's own terminal so one has two exes and can use the program on servers as well.
Posted: Thu Aug 09, 2007 3:14 pm
by Fred
May be you can redirect the stdout of your program and use a readonly editorgadget() to display it ?
Posted: Mon Oct 01, 2007 9:04 am
by Kazmirzak
actually, my code has always worked without even opening a console - it has always put all console-writings to the linux console (which is only open if the user started the program from there). Only problem is the compiler should never notice or he would righteous stop my code
Still I think an option would be great : OpenConsole(showconsole)
where showconsole could be 0=show no console, 1=only in debug 2=always
Posted: Mon Oct 01, 2007 5:19 pm
by Thalius
simply redirect stdout of your program wherever you want.
For Linux a per-project target line ( especialyl for debugging ) could be handy.
aka:
#?pbcompiler myprog.pb >> /home/foo/mylog.txt
just from editor - basically a console redirect to any console or tty interface would work that way ( i just love pipe =)
Thalius