Compiling opengl

hi

i am trying to compile opengl for ruby. I found two different distros on
the net, one of them looked like had been prepared for OSX where i work
mostly. I follow carefully the instructions on both with no luck, I
paste below the errors, if anyone could help it would be great.
many thanks

the first time I tried with opengl-0.32f, this one looked like prepared
for OSX

Ordenador-de-r2d2:/Volumes/data/software/ruby/opengl-0.32f r2d2$ ruby
extconf.rb
extconf.rb:36: undefined method `+' for nil (NameError)

···

----------------

This is the second one with opengl-0.1.32f

Ordenador-de-r2d2:/Volumes/data/software/ruby/opengl-0.1.32f r2d2$ ruby
extconf.rb
checking for XAllowDeviceEvents() in -lXi... yes
checking for XMITMiscGetBugMode() in -lXext... yes
checking for XmuAddCloseDisplayHook() in -lXmu... yes
checking for XOpenDisplay() in -lX11... yes
checking for main() in -lGL... yes
checking for main() in -lGLU... yes
creating Makefile
checking for main() in -lglut... no
Ordenador-de-r2d2:/Volumes/data/software/ruby/opengl-0.1.32f r2d2$ sudo make
Password:
Now Making opengl extend module
gcc -fno-common -g -Os -pipe -no-cpp-precomp -fno-common
-DHAVE_INTTYPES_H -pipe -pipe -I.
-I/usr/lib/ruby/1.6/powerpc-darwin7.0 -I. -I. -I/usr/X11R6/include -c
-o glu.o glu.c
glu.c:8:19: GL/gl.h: No such file or directory
glu.c:9:20: GL/glu.h: No such file or directory
glu.c:21: error: parse error before "tesselatorObj"
glu.c:21: warning: data definition has no type or storage class
glu.c:34: error: parse error before "GLUnurbsObj"
glu.c:34: warning: no semicolon at end of struct or union
glu.c:37: error: parse error before "tesselatorObj"
glu.c:37: warning: no semicolon at end of struct or union
glu.c:39: error: parse error before '}' token
glu.c:42: error: parse error before "GLUquadricObj"
glu.c:42: warning: no semicolon at end of struct or union
glu.c:77: error: parse error before "GLenum"
glu.c:77: warning: data definition has no type or storage class
glu.c:96: error: parse error before "type"
glu.c: In function `get_surface_dim':
glu.c:100: error: `GL_MAP2_VERTEX_3' undeclared (first use in this function)
glu.c:100: error: (Each undeclared identifier is reported only once
glu.c:100: error: for each function it appears in.)
glu.c:101: error: `GL_MAP2_VERTEX_4' undeclared (first use in this function)
glu.c:102: error: `GL_MAP2_INDEX' undeclared (first use in this function)
glu.c:103: error: `GL_MAP2_COLOR_4' undeclared (first use in this function)
glu.c:104: error: `GL_MAP2_NORMAL' undeclared (first use in this function)
glu.c:105: error: `GL_MAP2_TEXTURE_COORD_1' undeclared (first use in
this function)

  # etc ... until :

{standard input}:37:Ignoring attempt to re-define symbol.
{standard input}:43:Ignoring attempt to re-define symbol.
make[1]: *** [glu.o] Error 1
make: *** [opengl.bundle] Error 2

--
enrike

Hi,

This is the second one with opengl-0.1.32f

[...]

glu.c:8:19: GL/gl.h: No such file or directory
glu.c:9:20: GL/glu.h: No such file or directory

I found that on my OS X system, files like gl.h and
glu.h were buried in some obscure directory, like:

/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/blah/blah

so i made a GL directory locally (right next to
extconf.rb) and copied the following files there:

  gl.h
  glu.h
  glut.h

Hope this helps.... BTW my ruby version on OS X is:

  ruby 1.8.2 (2004-12-24) [powerpc-darwin7.6.0]

Regards,

Bill

···

From: "altern" <enrike@altern.org>

Have a look here:

http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/139863

Any problems, give me a shout

- James

hi

i was actually using the distro from
http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/139863
where those files are next to the extconf.rb when i got the error

Ordenador-de-r2d2:/Volumes/data/software/ruby/opengl-0.32f r2d2$ ruby
extconf.rb
extconf.rb:36: undefined method `+' for nil (NameError)

thanks

Bill Kelly wrote:

···

Hi,

From: "altern" <enrike@altern.org>

This is the second one with opengl-0.1.32f

[...]

glu.c:8:19: GL/gl.h: No such file or directory
glu.c:9:20: GL/glu.h: No such file or directory

I found that on my OS X system, files like gl.h and
glu.h were buried in some obscure directory, like:

/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/blah/blah

so i made a GL directory locally (right next to extconf.rb) and copied the following files there:

  gl.h
  glu.h
  glut.h

Hope this helps.... BTW my ruby version on OS X is:

  ruby 1.8.2 (2004-12-24) [powerpc-darwin7.6.0]

Regards,

Bill

--
enrike

Have a look here:

http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/139863

Any problems, give me a shout

i was actually following this instructions and this distro http://www.lazyatom.com/software/opengl-0.32f.tar.gz

i get this error :

Ordenador-de-r2d2:/Volumes/data/software/ruby/opengl-0.32f r2d2$ ruby
extconf.rb
extconf.rb:36: undefined method `+' for nil (NameError)

···

james.adam@gmail.com wrote:

- James

--
enrike

Hmm... I can't replicate that. try changing the line from

  $DLDFLAGS += " -framework OpenGL -framework GLUT -framework
Foundation"

to

  $DLDFLAGS = " -framework OpenGL -framework GLUT -framework Foundation"