Hi,
i am desperately trying to get ruby opengl to
compile properly for os x, but to no avail.
Haven’t you succeeded with the patch in [ruby-talk:44543]?
–
Nobu Nakada
hi,
no. this is what i tried.
my directory:
ChangeLog README.EUC glu.c ogl.c rbogl.c sample
MANIFEST extconf.rb glut.c ogl_patch rbogl.h
the patch:
— extconf.rb.org Sat Jul 06 00:29:30 2002
+++ extconf.rb Sat Jul 06 00:33:16 2002
@@ -30,7 +30,7 @@
glu_libname = “glu32”
glut_libname = “glut32”
else
-
$CFLAGS += " -I.
-I/System/Library/Frameworks/OpenGL.framework/Headers
-I/System/Library/Frameworks/GLUT/Headers"
dir_config(“x11”, “/usr/X11R6”)
— ogl.c.org Sat Jul 06 00:34:36 2002
+++ ogl.c Sat Jul 06 00:35:10 2002
@@ -5,7 +5,8 @@
#if defined (WIN32)
include “windows.h”
#endif
-#include “GL/gl.h”
+/#include “GL/gl.h”/
+#include “gl.h”
#include “rbogl.h”
#if defined CYGWIN
— glut.c.org Sat Jul 06 00:34:24 2002
+++ glut.c Sat Jul 06 00:35:28 2002
@@ -5,7 +5,8 @@
#if defined(WIN32)
include “windows.h”
#endif
-#include “GL/glut.h”
+/*#include “GL/glut.h” */
+#include “glut.h”
#include “ruby.h”
static int callId; /* ‘call’ method id */
— glu.c.org Sat Jul 06 00:37:42 2002
+++ glu.c Sat Jul 06 00:38:24 2002
@@ -5,8 +5,12 @@
#if defined(WIN32)
include “windows.h”
#endif
+/*
#include “GL/gl.h”
#include “GL/glu.h”
+*/
+#include “gl.h”
+#include “glu.h”
#include “rbogl.h”
#ifdef WIN32
— rbogl.c.org Sat Jul 06 00:37:32 2002
+++ rbogl.c Sat Jul 06 00:38:08 2002
@@ -6,7 +6,8 @@
include “windows.h”
#endif
#include “rbogl.h”
-#include “GL/gl.h”
+/* #include “GL/gl.h” */
+#include “gl.h”
#ifdef NO_NUM2DBL
extern double
then i did this:
[localhost:Ruby/trials/opengl] user% patch -p0 <ogl_patch
patching file extconf.rb
patching file ogl.c
patching file glut.c
patching file glu.c
patching file rbogl.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 6 with fuzz 1.
[localhost:Ruby/trials/opengl] user% ruby extconf.rb
checking for () in -lGL… yes
checking for () in -lGLU… yes
creating Makefile
checking for XAllowDeviceEvents() in -lXi… yes
checking for XMITMiscGetBugMode() in -lXext… yes
checking for XmuAddCloseDisplayHook() in -lXmu… yes
checking for () in -lglut… yes
creating Makefile
[localhost:Ruby/trials/opengl] user% make
Now Making glut extend module
gcc -fno-common -no-cpp-precomp -flat_namespace -pipe -no-precomp -I.
-I/System/Library/Frameworks/OpenGL.framework/Headers
-I/System/Library/Frameworks/GLUT/Headers -I.
-I/usr/local/lib/ruby/1.6/powerpc-darwin5.3 -I. -I/usr/local/include
-I/usr/X11R6/include -c -o glut.o glut.c
glut.c:9: glut.h: No such file or directory
glut.c: In function glut_SetColor': glut.c:818:
GLfloat’ undeclared (first use in this function)
glut.c:818: (Each undeclared identifier is reported only once
glut.c:818: for each function it appears in.)
glut.c:818: parse error before red' glut.c:822:
red’ undeclared (first use in this function)
glut.c:822: parse error before `rb_num2dbl’
… a lot more undeclared errors and warnings here …
glut.c:1458: GLUT_CURSOR_NONE' undeclared (first use in this function) glut.c:1459:
GLUT_CURSOR_FULL_CROSSHAIR’ undeclared (first use in this
function)
glut.c: At top level:
glut.c:159: warning: glut_SpecialFuncCallback' used but never defined glut.c:160: warning:
glut_SpaceballMotionFuncCallback’ used but never
defined
glut.c:161: warning: glut_SpaceballRotateFuncCallback' used but never defined glut.c:162: warning:
glut_SpaceballButtonFuncCallback’ used but never
defined
glut.c:163: warning: glut_ButtonBoxFuncCallback' used but never defined glut.c:164: warning:
glut_DialsFuncCallback’ used but never defined
glut.c:165: warning: glut_TabletMotionFuncCallback' used but never defined glut.c:166: warning:
glut_TabletButtonFuncCallback’ used but never
defined
glut.c:170: warning: glut_OverlayDisplayFuncCallback' used but never defined glut.c:171: warning:
glut_WindowStatusFuncCallback’ used but never
defined
make[1]: *** [glut.o] Error 1
make: *** [glut.bundle] Error 2
···
At Thu, 18 Jul 2002 15:10:29 +0900, > ccos wrote: