[Paraview-developers] How to write to the output window?
Robert Maynard
robert.maynard at kitware.com
Fri Dec 16 09:26:39 EST 2011
You can also go to the linker properties in Visual Studio and change
ParaView's subsystem to Console to automatically spawn a terminal
window when launching ParaView.
On Fri, Dec 16, 2011 at 2:26 AM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
> 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>
> 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
>
>> http://public.kitware.com/mailman/listinfo/paraview-developers
>
> _______________________________________________
>
> Paraview-developers mailing list
>
> Paraview-developers at paraview.org
>
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
>
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
--
Robert Maynard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changeLinkerSystemType.png
Type: image/png
Size: 30119 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20111216/acb2c27d/attachment-0001.png>
More information about the Paraview-developers
mailing list