[vtkusers] error: invalid conversion from 'GLint*' to 'long int*'

Martin Costabel costabel at wanadoo.fr
Tue Nov 4 02:24:14 EST 2008


Carl Trapani wrote:
[]
> I'm really not sure which is used? Eclipse indicates that 
> /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h is 
> used and indeed, it typedef's GLint to an int rather than long int (and 
> hence my problem).
[]
> I guess I'll look and see if I can't update OpenGL for my Mac. Anyone 
> know how I would do that? 

 From looking at various OpenGL/gl.h's, I would say your problem is just 
the opposite: You must have overwritten your System OpenGL.h by one that 
is not meant for MacOSX 10.4.

The System OpenGL headers are installed by OpenGLSDK.pkg from the Xcode 
disk. They are not updated automatically by SoftwareUpdate.

 From the oldest Xcode I could find up until the latest xcode for 10.4, 
xcode-2.5, I see "typedef long GLint;" in 
/System//Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h.

Starting from xcode-3.0 (the one that comes with OSX 10.5), I see 
"typedef int GLint;" there. Why Apple made this change and how they can 
get away with it without breakage, I don't know, but if you have 
"typedef int GLint;" in your /System OpenGL/gl.h, you must have 
installed an OpenGLSDK.pkg meant for 10.5.

-- 
Martin






More information about the vtkusers mailing list