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

David Cole david.cole at kitware.com
Mon Apr 21 16:22:00 EDT 2008


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> 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]
> *Sent:* April-21-08 3:35 PM
>
> *To:* dean.inglis at camris.ca
> *Cc:* vtkusers at vtk.org; 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>
> 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]
> > *Sent:* April-21-08 3:23 PM
> > *To:* dean.inglis at camris.ca
> > *Cc:* vtkusers at vtk.org; 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>
> > 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
> > > http://public.kitware.com/cgi-bin/mailman/listinfo/kwwidgets
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080421/f3fb37eb/attachment.htm>


More information about the vtkusers mailing list