[vtk-developers] Guidance needed fixing problems doing 64bit compile on Mac OS X
David Gobbi
dgobbi at atamai.com
Thu Oct 26 11:40:40 EDT 2006
Hi Sean,
It was nice to see you in Atlanta (finally a face to associate with the
email address!) I'm very eager to hear anything that you find.
In vtkXRenderWindowInteractor, as well, InternalCreateTimer() casts an
unsigned long (which is the type of XtIntervalId) to an int. So there
is bad stuff going on for all platforms.
I've built VTK on several 64-bit systems (Linux-IA64, Linux-x86_64,
IRIX64, sparc64) and haven't seen any problems yet, but that's probably
just because I've never run into a timer Id large enough.
My vote would be to use a vtkstd::map to store correspondences between
ints and the internal timer type.
- David
Sean McBride wrote:
> Hi all,
>
> In my spare time, I've been trying to do a 64bit build of vtk on my
> Mac. For the moment, things don't even compile.
>
> One problem is converting pointer-sized variables to int-sized
> variables, which is no good in the LP64 model because ints are still
> only 32 bit, while pointers are 64. For example:
>
> int platformTimerId = (int)[[vtkCocoaTimer alloc] initWithInteractor:this];
>
> In this case, the problem is the 'int' parameters of
> vtkRenderWindowInteractor::InternalCreateTimer() and
> vtkRenderWindowInteractor::InternalDestroyTimer().
>
> So, in general (not just for this one bad cast), my questions are:
>
> 1) Is it acceptable to change these ints to something bigger?
> 2) If so, what type? ptrdiff_t? void*?
>
> For this particular bad cast, I think we should switch from 'int' to a
> pointer-sized type because even in vt
> kWin32RenderWindowInteractor::InternalCreateTimer() it calls the Win32
> API SetTimer() which expects a UINT_PTR not an INT.
>
> Thoughts?
>
> Thanks!
>
>
More information about the vtk-developers
mailing list