[Paraview-developers] How to write to the output window?
Biddiscombe, John A.
biddisco at cscs.ch
Fri Dec 16 02:26:38 EST 2011
One method I use (on windows) is to add this to the main application
int main(int argc, char* argv[])
{
#ifdef WIN32
AllocConsole();
freopen("conin$", "r", stdin);
freopen("conout$", "w", stdout);
freopen("conout$", "w", stderr);
#endif
and then you can use std::cout to write to a terminal window.
Note that the paraview main is generated from an *.in file so it's better to modify the *.in file which generates paraview_main.cxx
JB
-----Original Message-----
From: paraview-developers-bounces at paraview.org [mailto:paraview-developers-bounces at paraview.org] On Behalf Of Utkarsh Ayachit
Sent: 15 December 2011 20:34
To: Joe Ping-Lin Hsiao
Cc: paraview-developers at paraview.org
Subject: Re: [Paraview-developers] How to write to the output window?
Try using the vtkErrorMacro() or vtkWarningMacro() ( or use qWarning(), qCritical(), qDebug() in Qt code)
Utkarsh
On Thu, Dec 15, 2011 at 2:30 PM, Joe Ping-Lin Hsiao <phsiao at cs.unc.edu<mailto:phsiao at cs.unc.edu>> wrote:
> Hi,
>
> I'd like to output debug information to the ParaView output windows
> for my C++ plugin.
> I tried to use cout but nothing shows up. Does anybody know how to do it?
>
> Thanks,
> Joe
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org<mailto:Paraview-developers at paraview.org>
> http://public.kitware.com/mailman/listinfo/paraview-developers
_______________________________________________
Paraview-developers mailing list
Paraview-developers at paraview.org<mailto:Paraview-developers at paraview.org>
http://public.kitware.com/mailman/listinfo/paraview-developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20111216/cf60bcfa/attachment.htm>
More information about the Paraview-developers
mailing list