No Console Window in GUI Project
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
No Console Window in GUI Project
I need to see Outputs like I see in xterm in Linux. In Windows it shows only Window with GDB.exe as current command and printing a cout statement yield nothing. Is this a bug?
I saw this in CL 8.1 and it here in 8.2
Also where did the old option to see output in CL itself go?
I saw this in CL 8.1 and it here in 8.2
Also where did the old option to see output in CL itself go?
CodeLite 15.x
CodeLite is awesome, I just Love it!
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: No Console Window in GUI Project
On Windows, a "Window" application does not have a terminal attached to it.
You can remove the flag "-mwindows" from the linker and it will open a console, but I am not sure that "printf" will go to it
Eran
You can remove the flag "-mwindows" from the linker and it will open a console, but I am not sure that "printf" will go to it
I am not familiar with thisevstevemd wrote:Also where did the old option to see output in CL itself go?
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: No Console Window in GUI Project
I can see that but it cannot send printf/cout/wxPuts.eranif wrote:On Windows, a "Window" application does not have a terminal attached to it.
You can remove the flag "-mwindows" from the linker and it will open a console, but I am not sure that "printf" will go to it
So where does Output go?
In Old CL we could see standard output (like cout/wxPuts) in some Window in Debugging mode. I don't remember which CL had it before it disappeared.eranif wrote:I am not familiar with thisevstevemd wrote:Also where did the old option to see output in CL itself go?
Eran
CodeLite 15.x
CodeLite is awesome, I just Love it!
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: No Console Window in GUI Project
This is Windows specific, you will need to read about OutputDebugString or something like that, I am not sureevstevemd wrote:I can see that but it cannot send printf/cout/wxPuts.
Recent CodeLItes (several versions now) are only using the native OS terminal, there is no more embedded terminal-alike in CodeLiteevstevemd wrote:In Old CL we could see standard output (like cout/wxPuts) in some Window in Debugging mode. I don't remember which CL had it before it disappeared.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
-
- CodeLite Curious
- Posts: 3
- Joined: Sat Jan 18, 2014 7:04 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: No Console Window in GUI Project
The old console (in CodeLite window) was nice in that the runtime output stayed around after debugging exited. Is there any way to have the OS terminal stick around after exiting debugging so that the text can be read/copied?eranif wrote:Recent CodeLItes (several versions now) are only using the native OS terminal, there is no more embedded terminal-alike in CodeLite
Eran
-
- CodeLite Enthusiast
- Posts: 28
- Joined: Tue Sep 11, 2012 11:50 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: No Console Window in GUI Project
not very very smart, but actually works for me:Is there any way to have the OS terminal stick around after exiting debugging so that the text can be read/copied?
Code: Select all
#include <iostream>
using namespace std;
int main(int argc, char **argv)
{
int res = 0;
cout << "Hello staying text console" << endl;
cin.ignore(); // wait for input, but not read it
return res;
}
Code: Select all
#include <stdio.h>
#include <stdlib.h>
int _tmain(int argc, char **argv)
{
int res = 0;
_tprintf("Hello staying text console\n");
_gettchar(); // wait for input, but not read it
return res;
}
MM
-
- CodeLite Curious
- Posts: 3
- Joined: Sat Jan 18, 2014 7:04 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: No Console Window in GUI Project
That helps a little, but it only works if you can run to end-of-program. When debugging, if any sort of crash condition is reached, that hack won't help.