[vtkusers] [KWWidgets] a compiler error in VTK/KWWidgets app

Francois Bertel francois.bertel at kitware.com
Mon Apr 21 16:42:31 EDT 2008


Another solution is to rename the ivar in vtkPointHandleRepresentation2D to something similar.

That's what happened to AddProp in vtkViewport. It used to be AddProp but this is an already-defined macro under Windows so it became AddViewProp.


David Cole wrote:
> It's because of this line:
> 
> #define CursorShape        0    /* largest size that can be displayed */
> 
> in the file "tcltk8.5.0win/include/x11/x.h"
> 
> I guess we'll have to #undef CursorShape in that VTK header file. 
> (Unless somebody has a better way around this...?)
> 
> For now, you can:
> #undef CursorShape
> #include "vtkPointHandleRepresentation2D.h"
> 
> 
> HTH,
> David
> 
> 
> On Mon, Apr 21, 2008 at 3:43 PM, Dean Inglis <dean.inglis at camris.ca 
> <mailto:dean.inglis at camris.ca>> wrote:
> 
>     ok,, just tried altering kwwidgets/Examples/MedicalImageViewer:
>      
>     add
>      
>     #include "vtkPointHandleRepresentation2D.h"
>      
>     at the end of the list of includes in vtkKWMyWindow.cxx
>      
>     Im getting the same weird error.
>      
>     ------------------------------------------------------------------------
>     *From:* David Cole [mailto:david.cole at kitware.com
>     <mailto:david.cole at kitware.com>]
>     *Sent:* April-21-08 3:35 PM
> 
>     *To:* dean.inglis at camris.ca <mailto:dean.inglis at camris.ca>
>     *Cc:* vtkusers at vtk.org <mailto:vtkusers at vtk.org>;
>     kwwidgets at kwwidgets.org <mailto:kwwidgets at kwwidgets.org>
>     *Subject:* Re: [KWWidgets] a compiler error in VTK/KWWidgets app
> 
>     What do you include prior to vtkPointHandleRepresentation2D.h?
> 
>     If you comment out line 96 of vtkPointHandleRepresentation2D.h, does
>     it allow your file to compile... or give you a better compiler error
>     message? (Obviously, it won't allow the associated VTK source to
>     compile, this is just for troubleshooting.)
> 
> 
> 
>     On Mon, Apr 21, 2008 at 3:27 PM, Dean Inglis <dean.inglis at camris.ca
>     <mailto:dean.inglis at camris.ca>> wrote:
> 
>         cvs as of Friday last week.  At line 96 there is a declaration
>         of a vtkPolyData
>         ivar for storing the cursor shape.
> 
>         ------------------------------------------------------------------------
>         *From:* David Cole [mailto:david.cole at kitware.com
>         <mailto:david.cole at kitware.com>]
>         *Sent:* April-21-08 3:23 PM
>         *To:* dean.inglis at camris.ca <mailto:dean.inglis at camris.ca>
>         *Cc:* vtkusers at vtk.org <mailto:vtkusers at vtk.org>;
>         kwwidgets at kwwidgets.org <mailto:kwwidgets at kwwidgets.org>
>         *Subject:* Re: [KWWidgets] a compiler error in VTK/KWWidgets app
> 
>         What's on line 96 of vtkPointHandleRepresentation2D.h?
> 
>         Is this CVS HEAD for both KWWidgets and VTK...?
> 
> 
>         On Mon, Apr 21, 2008 at 2:49 PM, Dean Inglis
>         <dean.inglis at sympatico.ca <mailto:dean.inglis at sympatico.ca>> wrote:
> 
>             I am developing an application that
>             uses vtkPointHandleRepresentation2D in the
>             representation of a vtkSeedWidget.  KWWidgets
>             is used as the GUI to display an image
>             in a render window.  During a lengthy callback
>             that does some image processing, I manually access
>             the main window's progress gauge to periodically
>             give user feedback.  If I #include the headers for
>             vtkKWApplication
>             and vtkPointHandleRepresentation2D in the source file for the
>             application main window (not the application driver),
>             I get the following error:
> 
>             vtkPointHandleRepresentation2D.h(96) : error C2059: syntax
>             error 'constant'
>             vtkPointHandleRepresentation2D.h(96) : error C2238:
>             unexpected token(s)
>             preceding
>             ';'
>             Nmake : fatal error U1077
> 
>             etc. etc.
> 
>             If I comment out the use of code requiring use of either one
>             of those
>             headers,
>             the app compiles.  I am building vtk, kwwidgets in shared
>             release mode on 32
>             bit Vista
>             with Visual Studio 2005 and doing an nmake install to a
>             common development
>             directory.
>             Any ideas as to what is going on would be appreciated.
> 
>             Dean
> 
>             _______________________________________________
>             KWWidgets mailing list
>             KWWidgets at kwwidgets.org <mailto:KWWidgets at kwwidgets.org>
>             http://public.kitware.com/cgi-bin/mailman/listinfo/kwwidgets
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers


-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                       | Clifton Park NY 12065, USA



More information about the vtkusers mailing list