Re: [Plib-users] Building Plib on Mac OSX (Darwin)
Brought to you by:
sjbaker
From: Reed H. <re...@ze...> - 2001-12-28 20:16:39
|
Hi, thanks for the help. Since sending that message I found AGL and used that, and Plib builds. Here is what I did to get ssg building, and similiar modifications to sg and util: 1. added "-framework OpenGL -framework AGL -framework CoreServices" to LIBS in the Makefile 2. changed some #include statements accordingly: from <GL/foo.h> to <OpenGL/foo.h> from <ag.h> to <AGL/agl.h> from <CodeFragments.h> in util/ul.h to <CoreServices/CoreServices.h>. I also added #include <unistd.h> to util/ul.h after CoreServices (for the sleep() function) 2. remove "-O6" from CXXFLAGS and CFLAGS in the Makefile ??? where did this come from ??? 3. add -Dmacintosh to DEFS in the Makefile. 4. changed int vp [ 4 ] ; on line 202 of ssg.cxx to GLint vp [ 4 ] ; 5. changed int ww; on line 112 of ssgLoadTexture.cxx to GLint ww; Frameworks are Darwin's way of doing libraries, they are versioned bundles (directories, actually) of headers, libraries and resources... to link to a framework SOMEFW, you pass '-framework SOMEFW' to cc, and to include header files out of it you include <SOMEFW/header.h>. Frameworks are a nice idea... but a pain in the ass for porting stuff from other unix platforms... I'm working on the Tux example program now. Here is the error, which has me stumped. I will try to enlist the help of some people who know more about OSX than me... linked to -framework GLUT and include <GLUT/glut.h> instead of <GL/glut.h>. make: c++ -g -O2 -Wall -o tux_example tux_example.o -lplibssg -lplibsg -lplibul -lpthread -lm -framework OpenGL -framework AGL -framework CoreServices -framework GLUT /usr/bin/ld: /usr/lib/crt1.o illegal reference to symbol: __objcInit defined in indirectly referenced dynamic library /usr/lib/libobjc.A.dylib make: *** [tux_example] Error 1 -- 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. |