[Openmcl-devel] Trouble with ffigen
David Steuber
david at david-steuber.com
Wed Feb 2 13:08:11 PST 2005
On Feb 2, 2005, at 2:35 AM, Gary Byers wrote:
> The gl.ffi file should contain a line that looks something like:
>
> (macro ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 66)
> "GL_ACCUM" "0x0100")
>
> Depending on what version of "gl.h" got parsed, the line number (66)
> might
> be a little different.
>
> Is there something that looks more-or-less like that in the gl.ffi
> file ?
>
> If so, what does it look like, exactly ?
There are no occurrences of the word "macro" anywhere in gl.ffi. I
think ffigen skipped over all the #defines. The first bit of the file
looks like this:
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 40)
"GLenum"
(unsigned-long ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 41)
"GLboolean"
(unsigned-char ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 42)
"GLbitfield"
(unsigned-long ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 43)
"GLbyte"
(signed-char ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 44)
"GLshort"
(short ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 45)
"GLint"
(long ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 46)
"GLsizei"
(long ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 47)
"GLubyte"
(unsigned-char ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 48)
"GLushort"
(unsigned-short ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 49)
"GLuint"
(unsigned-long ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 50)
"GLfloat"
(float ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 51)
"GLclampf"
(float ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 52)
"GLdouble"
(double ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 53)
"GLclampd"
(double ()))
(type ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h" 54)
"GLvoid"
(void ()))
(function ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"
2104)
"glAccum"
(function
((typedef "GLenum") (typedef "GLfloat") )
(void ())) (extern))
(function ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"
2105)
"glAlphaFunc"
(function
((typedef "GLenum") (typedef "GLclampf") )
(void ())) (extern))
(function ("/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"
2106)
"glAreTexturesResident"
(function
((typedef "GLsizei") (pointer (unsigned-long ())) (pointer (typedef
"GLboolean
")) )
And so on. Note the jump in line numbers.
More information about the Openmcl-devel
mailing list