Seeing output in MSW
-
- CodeLite Veteran
- Posts: 81
- Joined: Thu Mar 21, 2013 1:12 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
Seeing output in MSW
Sorry for a very basic question, but I cannot find how to see my program's output under MSW.
In Linux either xterm opens when I run the program or a degguging window opens if I am debugging. In both cases std::cout goes to a window.
But I don't get either of these in MSW and despite a googling a wide range of keywords, surprisingly nothing turns up with the answer.
Thanks for helping!
In Linux either xterm opens when I run the program or a degguging window opens if I am debugging. In both cases std::cout goes to a window.
But I don't get either of these in MSW and despite a googling a wide range of keywords, surprisingly nothing turns up with the answer.
Thanks for helping!
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Seeing output in MSW
Are you writing a GUI application or console?
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Veteran
- Posts: 81
- Joined: Thu Mar 21, 2013 1:12 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Seeing output in MSW
Sorry I should have made that clear, its a GUI
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Seeing output in MSW
IIRC, under Windows, GUI applications are created without a console attached
If you are using wxWidgets, use wxLogMessage and set up a log window for this
http://docs.wxwidgets.org/2.9.4/group__ ... gging.html
Eran
If you are using wxWidgets, use wxLogMessage and set up a log window for this
http://docs.wxwidgets.org/2.9.4/group__ ... gging.html
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Veteran
- Posts: 81
- Joined: Thu Mar 21, 2013 1:12 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Seeing output in MSW
So there is no CL debugging output window under MSW the same way as there is in Linux?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Seeing output in MSW
No, its up to your code to provide it
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Veteran
- Posts: 81
- Joined: Thu Mar 21, 2013 1:12 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Seeing output in MSW
Thank you for taking the time to explain this.
I would like to add this as a feature request, actually it would be really nice to have a window in the IDE for both Windows and Linux where std::cout can be seen rather than a pop-up terminal (Linux) and /or having to implement a wxLogWindow (Linux and Windows).
Do you mind if I add this as a feature request?
I would like to add this as a feature request, actually it would be really nice to have a window in the IDE for both Windows and Linux where std::cout can be seen rather than a pop-up terminal (Linux) and /or having to implement a wxLogWindow (Linux and Windows).
Do you mind if I add this as a feature request?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Seeing output in MSW
Like I said: its up to your application to create such window , codelite can't do that for you.
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 231
- Joined: Sat Nov 24, 2012 8:04 pm
- Genuine User: Yes
- IDE Question: c++
- Location: Los Angeles
- Contact:
Re: Seeing output in MSW
On Linux all you need to see logs in CL's debugger pane is:
if it doesn't work as is on Windows see MSDN docs around ::OutputDebugString(). If your app isn't wx-based, copy the part of wxLog code you need to replicate it.
cheers,
-- p
Code: Select all
new wxLogChain(new wxLogStderr(stdout))
cheers,
-- p
main: Debian Jessie x64 + custom wxTrunk
-
- CodeLite Veteran
- Posts: 81
- Joined: Thu Mar 21, 2013 1:12 pm
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Seeing output in MSW
Thank you for your replies.
The problem with the following is that in MSW stdout doesn't appear to go anywhere (under Windows 8 at least).
So I think the only way is (as Eran suggested) to create a wxLogWindow.
Just a thought, but personally I would like all stdout to go to the "Output" tab of the "Output View" pane
The problem with the following is that in MSW stdout doesn't appear to go anywhere (under Windows 8 at least).
Code: Select all
new wxLogChain(new wxLogStderr(stdout))
Thank you for this tip. I tried this but also the output seems to go nowhere, even if I set debugevents as it suggests in the gdb manual.see MSDN docs around ::OutputDebugString()
So I think the only way is (as Eran suggested) to create a wxLogWindow.
Code: Select all
wxLogWindow *w= new wxLogWindow(this, wxT("Logger"));
w->Show();