[ruby-opengl-devel] Fix to get it working on my system:

John Gabriele jmg3000 at gmail.com
Tue Aug 29 15:13:20 EDT 2006


On 8/29/06, John Gabriele <jmg3000 at gmail.com> wrote:
> On 8/29/06, minh thu <noteed at gmail.com> wrote:
> > hi,
> > here is my diff (i send it earlier to Peter).
> >
> > Index: trunk/ext/glut/glut.i
> > ===================================
> > --- trunk/ext/glut/glut.i       (revision 20)
> > +++ trunk/ext/glut/glut.i       (working copy)
> > @@ -22,7 +22,7 @@
> >  %}
> >  #else
> >  %header %{
> > -#include <GL/glut.h>
> > +#include <GL/freeglut_std.h>
> >  %}
> >  #endif
> >
> > [snip]
>
> Hi Thu,
>
> Thank you, but note, I think on most *nix systems, glut.h simply
> #includes freeglut_std.h. It does on mine.
>

Ah. I see what you were getting at: doesn't build when you just
specify glut.h, but works when you have "freeglut_std.h" in there. I
get the same thing. Peter suggested to me that this may have something
to do with how swig deals with includes (i.e., "%include vs #include,
and the --includeall flag"). Will have to read up on that.

>
> > Index: trunk/ext/glut/rakefile
> > ===================================================================
> > --- trunk/ext/glut/rakefile     (revision 20)
> > +++ trunk/ext/glut/rakefile     (working copy)
> > @@ -23,7 +23,7 @@
> >      # Don't understand why swig doesn't define this...
> >      swig_args = "-DSWIGMAC"
> >  else
> > -    extconf_args = ""
> > +    extconf_args = "--with-ldflags='-lGL -lGLU -lglut'"
> >      swig_args = "-I/usr/include"
> >  end
> >
>
> Yup. Got this one. Thanks,
> ---John

Hmm... That extra extconf_args string is in ext/glut/rakefile, but not
in ext/gl/rakefile. I'd expect it would be needed there also, and as
"--with-ldflags='-lGL -lGLU'"...

Thanks again for the heads-up.

---John


More information about the ruby-opengl-devel mailing list