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

Bill Hoffman bill.hoffman at kitware.com
Thu Oct 26 11:38:28 EDT 2006


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.
>   
Strange:
http://developer.apple.com/macosx/64bit.html
Seems to imply that this is the same model used by other unix 64 bit 
platforms.
However, there are dashboards with win64 and IRIX64 that are working.
Although the example you give is in Mac specific code, so I would say
fix the mac specific code, and things should work.

-Bill





More information about the vtk-developers mailing list