Re: lablgtk2 + lablgl + native code on Mac
Jeffrey Scofield <[email protected]>
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Message-ID | <[email protected]> |
Philippe: > here's a simple build script: > > MLLIBS=/opt/godi/lib/ocaml > GL="$MLLIBS/pkg-lib/lablGL" > EXT="$MLLIBS/site-lib/extlib" > OSX_GL_DYLIB="-dylib_file > /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\ /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" ocamlopt > > -I $EXT -I +lablgtk2 -I $GL -ccopt "$OSX_GL_DYLIB" -o glplot \ > extLib.cmxa lablgtk.cmxa lablgl.cmxa lablgtkgl.cmxa gtkInit.cmx glplot.ml Thanks very much! I was able to get it working after looking at your example. I now have a native code version of the example named morph3d. I'm using the fink versions of the OCaml modules. Here are my Makefile lines for anyone interested: GLLIB = -cclib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib morph3d: morph3d.ml ocamlopt -I +lablgl -I +lablgtkgl -I +lablgtk2 -o morph3d lablgl.cmxa lablgtk.cmxa lablgtkgl.cmxa $(GLLIB) gtkInit.cmx morph3d.ml >> The main difficulty (I think) is in some kind of Apple problem >> with the OpenGL libraries. There is a mysterious workaround that >> works for lablgl, but I can't see how to apply it to this new >> situation. > > maybe it's this you're refering: > > http://developer.apple.com/qa/qa2007/qa1567.html Yes, this is what I'm referring to. The word on the Apple X mailing list is to use the workaround and not worry too much about it. That's what I'm trying to do, but I'm a born worrier. (Thanks for this link, too, BTW.) Thanks very much for the help. I really appreciate it. Regards, Jeffrey Scofield Seattle WA USA