From: Martin Stannard Date: 2002-01-09T11:48:50+09:00 Subject: RE: Problem with OpenGL for Ruby Hi, ----Original Message----- From: isambart@netcourrier.com [mailto:isambart@netcourrier.com] Sent: Tuesday, 8 January 2002 11:20 PM To: ruby-talk@ruby-lang.org Subject: Problem with OpenGL for Ruby >Hello, >I am new using Ruby and I would like to use OpenGL for Ruby. I tried >this week-end to compile and run this extension on Windows 2000 using >Microsoft Visual C++ 6.0 and Ruby-mswin32 1.6.6. I compiled without >any problem the two DLLs but when I tried to run the example I had >problems. The line 'require "opengl"' makes a segmentation fault. If I >try to use only glut, when I run the line 'GLUT.DisplayFunc display', >with display created with 'display = Proc.new { ... }' , I have the >error that the parameter is not an object... >So comeone could help me ? I can build the opengl module from http://www2.giganet.net/~yoshi/ with Ruby mswin32 1.6.5, VC6.0, win2k like this: F:\otherscode\ruby\thirdparty\opengl>vcvars32.bat Setting environment for using Microsoft Visual C++ tools. F:\otherscode\ruby\thirdparty\opengl>ruby extconf.rb checking for () in -lopengl32... yes checking for () in -lglu32... yes creating Makefile checking for XAllowDeviceEvents() in -lXi... no checking for () in -lglut32... yes creating Makefile F:\otherscode\ruby\thirdparty\opengl>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. Now Making glut extend module >>> snipped about 20 warnings and build info Creating library glut.lib and object glut.exp Now Making opengl extend module >>> snipped build info Creating library opengl.lib and object opengl.exp F:\otherscode\ruby\thirdparty\opengl> Then I copied the opengl.so and glut.so to my ruby installation: E:\rubywin32\lib\ruby\site_ruby\1.6\i586-mswin32\ Most of the samples that come with the opengl module work. Hope that helps, Martin