[ODE] Re: Mac OS X installation of drawstuff

Ruud van Gaal ruud at marketgraph.nl
Tue Mar 18 07:22:01 2003


> After some work I got ode-0.035 along with the drawstuff-lib 
> to compile in Mac OS X under gcc using the makefile. Here's 
> what had to do:
> 
> 1. to compile the drawstuff-lib:
> in response to the 
> 	GL/gl.h and GL/glu.h: no such file or directory
> and then later all the X11 headers, I _copied_ the gl and x 
> headers from /usr/X11R6 into GL and X11 directories created 
> in ode-0.035/include/. Just creating symbolic links didn't 
> work for me.

Hm, I think I do #include <OpenGL/OpenGL.h> instead. Which is the OpenGL
framework include (I don't have my Mac near, so can't check for the
exact name).
At link time, add '-framework OpenGL' to the link line.

> 2. ranlib problem: I got the following errors:
> 	ld: archive: lib/libode.a has no table of contents, add 
> one with ranlib(1) (can't load from it)
> 	ld: archive: lib/libdrawstuff.a has no table of 
> contents, add one with ranlib(1) (can't load from it) Since 
> just running ranlib on the files ("ranlib libode.a") did not 
> work, I changed the line in makefile.osx to: RANLIB=ranlib. 

Strange; just a ranlib on the lib*.a files works for me here
(OSX10.2.3).

> 3. compiling ode-test: linking test_chain2.o complains of 
> undefined symbols. It needs the c++ lib. So in makefile.osx I 
> changed  LINK_MATH=-lm by adding -lstdc++ 

This should probably be unnecessary if you link with g++. The above
looks like you're linking with gcc instead of g++.

> 4. After that, everything works fine -- if I remember to 
> start up X11.

Ah, I don't run in X11 though (haven't used DrawStuff on Mac as well,
just on Linux).

> If I forget, and just try to run one of the 
> test apps from a terminal without X11 also running, I would 
> get  "Error: Bus error."  I tracked the bus error down to a 
> call to dsError in createMainWindow in x11.cpp. Was: dsError 
> (0,"can not open X11 display"); but it should be: dsError 
> ("can not open X11 display");.

Hopefully someone can fix this in the CVS.

Cheers,
Ruud