# Opengl problem (from gears sample)

**URL:** <https://www.ruby-forum.com/t/opengl-problem-from-gears-sample/189795>\
**Category:** Ruby\
**Created:** [June 7, 2010, 11:24pm UTC](https://www.ruby-forum.com/t/opengl-problem-from-gears-sample/189795 "2010-06-07T23:24:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![robyonrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@robyonrails](https://www.ruby-forum.com/u/robyonrails)\
**Post date:** [June 7, 2010, 11:24pm UTC](https://www.ruby-forum.com/t/opengl-problem-from-gears-sample/189795/1 "2010-06-07T23:24:57Z")

</div>

I wanted to take a look at ruby’s opengl but I’m having issues – can  
you help me out? I installed it and I can require it in irb or a file  
without issue:

irb  
001:0\> require ‘opengl’  
true  
002:0\> include Gl, Glu, Glut  
Object

I downloaded the opengl gears demo here:  
[http://members.shaw.ca/michael.brooks/gears\_using\_shaders.zip](http://members.shaw.ca/michael.brooks/gears_using_shaders.zip)  
and this won’t run. It errors out with:  
ruby: symbol lookup error:  
/usr/lib/ruby/gems/1.9.3dev/gems/ruby-opengl-0.60.1/lib/glut.so:  
undefined symbol: STR2CSTR

## ruby -v ruby 1.9.3dev (2010-05-31 trunk 28108) [powerpc64-linux] gem specification ruby-opengl|grep -1 version name: ruby-opengl version: !ruby/object:Gem::Version prerelease: false

- 1  
version: 0.60.1  
platform: ruby  
…  
rubyforge\_project: ruby-opengl  
rubygems\_version: 1.3.7  
signing\_key:  
specification\_version: 2  
summary: OpenGL Interface for Ruby

---

<div class="post-metadata">

**Author:** ![robyonrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@robyonrails](https://www.ruby-forum.com/u/robyonrails)\
**Post date:** [June 7, 2010, 11:30pm UTC](https://www.ruby-forum.com/t/opengl-problem-from-gears-sample/189795/2 "2010-06-07T23:30:08Z")

</div>

I wrote:

> I downloaded the opengl gears demo here:  
> [Shaw Communications](http://members.shaw.ca/michael.brooks/gears_using_shaders.zip)

I’m sorry that’s the wrong gears demo link …

> **[ActiveState Community](https://community.activestate.com)**
>
> Community support for users of the ActiveState Platform.

---

<div class="post-metadata">

**Author:** ![robyonrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@robyonrails](https://www.ruby-forum.com/u/robyonrails)\
**Post date:** [June 7, 2010, 11:34pm UTC](https://www.ruby-forum.com/t/opengl-problem-from-gears-sample/189795/3 "2010-06-07T23:34:22Z")

</div>

Roberto Cm wrote:

> I downloaded the opengl gears demo here:  
> [Shaw Communications](http://members.shaw.ca/michael.brooks/gears_using_shaders.zip)  
> and this won’t run. It errors out with:  
> ruby: symbol lookup error:  
> /usr/lib/ruby/gems/1.9.3dev/gems/ruby-opengl-0.60.1/lib/glut.so:  
> undefined symbol: STR2CSTR

Try installing and running it with ruby 1.8.x. The STR2CSTR macro is not  
used in 1.9.2, so it looks like someone will have to update the opengl  
lib.

---

<div class="post-metadata">

**Author:** ![robyonrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@robyonrails](https://www.ruby-forum.com/u/robyonrails)\
**Post date:** [June 7, 2010, 11:58pm UTC](https://www.ruby-forum.com/t/opengl-problem-from-gears-sample/189795/4 "2010-06-07T23:58:45Z")

</div>

Joel VanderWerf wrote:

> Roberto Cm wrote:
> 
> > I downloaded the opengl gears demo here:  
> > [Shaw Communications](http://members.shaw.ca/michael.brooks/gears_using_shaders.zip)  
> > and this won’t run. It errors out with:  
> > ruby: symbol lookup error:  
> > /usr/lib/ruby/gems/1.9.3dev/gems/ruby-opengl-0.60.1/lib/glut.so:  
> > undefined symbol: STR2CSTR
> 
> Try installing and running it with ruby 1.8.x. The STR2CSTR macro is not  
> used in 1.9.2, so it looks like someone will have to update the opengl  
> lib.  
> that’s a shame …

I can confirm it does work, although very slowly, in 1.8. thanks
