Re: [Plib-users] Building Plib on Mac OSX (Darwin)
Brought to you by:
sjbaker
From: Reed H. <re...@ze...> - 2001-12-30 19:48:06
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jon, have you been working on plib on OSX? How much have you got working? I have working for me everything except fnt, and sl and js (need some bigger porting) and haven't looked at net at all. Basically the tux ssg example, the simple and complex pui examples (but not widget_list). Segfault somewhere in puFilePicker::setSize(). Is any OSX stuff in CVS yet? I was going to put together a patch, but would like to know what's there already. Would it be possible for me to check out the CVS tree, to find a recent tarball somewhere? On Saturday, December 29, 2001, at 06:03 PM, Beegee wrote: > I resolved the __objcInit error by linking against libobjc, from > /usr/lib. There was some discussion about this on the ProjectBuilder > list, but I don't have the thread handy. yup, that works fine. I think some of the OpenGL library is in Objective-C ("cocoa") > > Additionally, there was a bug in 10.1 I believe that caused a crash if > you called aglGetCurrentContext() before you created a context. That > led me to just have glIsValidContext() always return true on OS X. > Sloppy I know... > Yeah, most of Carbon AGL is "Unsupported" according to the on-line docs, and aglGetCurrentContext() doesn't work, and needs to be removed. There are equivalents in the Objective-C ("Cocoa") OpenGL interfaces, that I will try out. > Also, I've made basically the exact same changes that you listed except that I kept 'macintosh' and 'MACOSX' as separate > targets because of things like <OpenGL/GL.h> vs <GL/GL.h>. What macros are defined on MacOSX? I know __APPLE__ and __MACH__ are, are there any that just mean "you're on MacOSX" ? ("__MACOSX__" or something?). I think stuff like: #if defined(__APPLE__) && defined(__MACH__) // Mac OSX #include <OpenGL/gl.h> #else #include <GL/gl.h> #endif would work pretty fine (or probably just #ifdef __MACH__). Do you guys agree? If so, I'll make up the patch. I'm still not sure how to get the correct linker flags into the Makefiles via autoconf (will look into it sometime) but this is what's needed in the Makefiles for OSX: There should be no X11 libraries at all ("-lX11 -lXi -lXext -lXmu"). This is not a problem in the libraries, because the X libraries aren't actually linked, but I had to remove those flags when building the example programs. These flags should be added in these makefiles: ssg/Makefile: LIBS += -framework OpenGL pui/Makefile: LIBS += -framework GLUT All of the examples I tried: LIBS += -lobjc -framework OpenGL - -framework GLUT Let me know about CVS, patching, and if anyone knows about making autoconf work. rh - -- Reed Hedges re...@ze... http://zerohour.net/~reed Virtual Object System -- Internet Virtual Reality: http://www.interreality.org The owls are not what they seem. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjwvaNEACgkQ43zrjhPEi7/pTQCfRkrZXChfK2ZQjgN6Z7z/vUES pvsAoLnj+ocrP9jOyWSq5QDA01WufHO6 =0j7b -----END PGP SIGNATURE----- |