[vtk-developers] Guidance needed fixing problems doing 64bit compile on Mac OS X

clinton at elemtech.com clinton at elemtech.com
Thu Oct 26 11:11:01 EDT 2006


I thought 64 bit Cocoa/Carbon wasn't going to be available until Leopard came 
out.

Clint

On Thursday 26 October 2006 9:03 am, 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