[Paraview-developers] How to write to the output window?
David Cole
david.cole at kitware.com
Fri Dec 16 09:37:57 EST 2011
On Fri, Dec 16, 2011 at 9:26 AM, Robert Maynard
<robert.maynard at kitware.com> wrote:
> 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.
>
Ewwwwwwwww.
>
>
> 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
>
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
More information about the Paraview-developers
mailing list