|
From: Michael L. <Mic...@hr...> - 2001-11-05 08:39:22
|
On Monday, November 5, 2001, at 02:47 , Braden McDaniel wrote: > On Sun, 2001-11-04 at 16:51, Oliver Strutynski wrote: >> Anyway, I think it should be mostly clear from the patch what needs to be >> added for OpenVRML to compile on MacOSX (the additional frameworks + >> modified >> checks for glut/opengl). I hope this information proves useful for you. > > I can try adapting your changes, but I'd like to know a little bit more > about them first... > > What prompts the dependency on the Objective C library? I'm not sure whether "Foundation" or objc are needed. I didn't need them to compile OpenVRML and Lookat under Mac OS X 10.0.4. I believe, that the compiler (a modified? gcc 2.95.2) includes the System framework transparently, which should handle any other "wierd" dependencies Mac OS X may have. I haven't tried with Mac OS X 10.1, though. I guess this is something we need to test. OpenGL and GLUT are needed however. In fact, to link Lookat, only GLUT is needed, since declaring that you want to use GLUT "automatically" gives you OpenGL, since GLUT depends on OpenGL. For example (under 10.0.4), this links Lookat to the static libraries from the command-line: c++ -Wall -g -O2 -o lookat -framework GLUT lookat.o ViewerGlut.o ../lib/libopenvrml-gl.a libopenvrml.a ../../jpeg-6b/libjpeg.a ../../libpng-1.0.5/libpng.a -lz (of course, if I'd "installed" OpenVRML, JPEG, and PNG, then I could have just used -L/usr/local/lib and -llibopenvrml-gl, etc.). If it makes modifying the build system easier, OpenGL and GLUT are standard installs under Mac OS X, so you could skip testing them under Mac OS X, and just replace -lglut with -framework GLUT and -lgl with -framework GL when compiling under Mac OS X. > What exactly does the -framework compiler flag do? Frameworks are bundles of header files and libraries (and documentation). -framework is a bit like -l and -L rolled into one where the developer just needs to supply the name of the API/Framework. This means that -lgl and -lglut need to be replaced with -framwork GL and -framework GLUT on Mac OS X. Also, for some reason, Oliver has the OpenGL framework declared twice in the same line in his "Diff for macros/gl.m4". I guess an interesting long-term goal for OpenVRML on Mac OS X, would be to package the Mac OS X distribution as a Framework. Mike. |