How to Install ODE

online manual

INSTALLING ON WINDOWS

You need to have a C compiler. I recommend you download and install Visual C++ from Visual Studio Express for free. Download the 2012 Windows Desktop version if you don't already have a version installed. If you have trouble running it due to Windows version problems, then try Visual Studio 2010.

Download ode-1906.zip and unzip it. Move the ode-1906 directory to wherever you would like to put third party software. (If you know how to use Subversion (svn) on Windows, try using the svn info in the Linux section and let me know how to do the same in Windows.)

Open a command prompt window (accessories/command prompt) and enter into the ode-1906/build subdirectory. Run the command:

 premake4 --with-demos --only-double vs2008
Use 2008 even if you actually have a newer version of Visual Studio.

Double click on ode-1906/build/vs2008/ode.vcproj This should launch a Visual C++ window. If it doesn't work or you don't get the Visual C++ version you want, manually start Visual C++ and open this file using Open Project. If you are running a version of Visual Studio other than 2008 it will want to convert the project. Convert it. No need to create backups if it asks about that.

VS2008: Click on the toplevel menu item Build, and then Build Solution
VS2010: Click on the toplevel menu item Debug, and then Build Solution.
VS2012: Let me know what to do here, I couldn't get VS2012 to run.

This should have built the DebugDLL configuration (look for a window saying DebugDLL in the tool bar of Visual Studio). Now compile the DebugLib configuration as well by changing the window to DebugLib and rebuilding the solution.

Executable demo programs end up in ode-1906/lib/DebugDLL/

INSTALLING ON LINUX

Note: If OpenGL includes and libraries are not already installed in your version of linux, you may have to install some packages along the lines of Free86-OpenGL-devel-xxx, X11-OpenGL-devel-xxx, Mesa-libGL-devel-xxx, libgl1-mesa-dev, libgl1-mesa-dev, libx11-dev, and libglu1-mesa-dev. Check out http://www.mesa3d.org/. Something like

 sudo apt-get update
 sudo apt-get install libgl1-mesa-dev libx11-dev libglu1-mesa-dev
or
 sudo apt-get update
 sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
should install all the headers

Download ode from its subversion repository (which is more up-to-date than sourceforge):

svn co https://opende.svn.sourceforge.net/svnroot/opende/trunk ode

I suggest you rename the ode directory to ode-xxxx where xxxx is the revision number printed out by the svn command at the end of the download. It should be 1906 or greater.

If you have trouble using svn, you can download the 1906 revision from here

The following is from the file ode-xxxx/INSTALL.TXT. You may need to install the automake package.

cd ode-xxxx
./bootstrap
./configure --enable-double-precision
make

To copy .h files and libraries to /usr/local/include and /usr/local/lib:

sudo make install
sudo cp -p drawstuff/src/.libs/libdrawstuff.a /usr/local/lib/
sudo cp -p drawstuff/src/libdrawstuff.la /usr/local/lib/
sudo cp -rp include/drawstuff /usr/local/include/
sudo cp -rp drawstuff/textures /usr/local/include/drawstuff/

You are ready to roll here.

To run the demos

cd ode/demo
./demo_basket
...

What follows is for people who want to get into it more deeply.

Look at ode-xxxx/INSTALL.txt for how to tune ODE for your machine.

----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

INSTALLING ON OS X

Installing ODE

First download a recent version (at least 4.3) of premake from http://sourceforge.net/projects/premake/files/

Then download ode from its subversion repository (which is more up-to-date than sourceforge):

svn co https://opende.svn.sourceforge.net/svnroot/opende/trunk ode

I suggest you rename the ode directory to ode-xxxx where xxxx is the revision number printed out by the svn command at the end of the download. It should be 1906 or greater.

If you have trouble using svn, you can download the 1906 revision from here

Then run:

cd ode-xxx
./bootstrap
./configure --enable-double-precision
make
cd build
premake4 gmake
cd gmake
make config=debugdoubledll

Alternate ODE installation instructions.

Given below are the steps that were used to successfully install ODE on Mac OS X 10.8.2.

1. Install macport: http://guide.macports.org/

2. Install Xcode. Most of the time it is preinstalled in OSX, if not you can find it at https://developer.apple.com/xcode/.

3. Then the command-line tools, which are not bundled with Xcode 4.3 by default,

4. In a terminal run all these:

sudo port install automake
sudo port install autoconf
sudo port install libtool
sudo port install pkgconfig
sudo port install cmake
sudo glibtoolize --ltdl --force --copy

5. Try running libtoolize. You may get the message:

*./bootstrap: line 17: libtoolize: command not found*

If so you need to edit ode-xxx/bootstrap in text editor, because on Mac libtoolize is called glibtoolize. You need to edit 'bootstrap' and change 'libtoolize' to 'glibtoolize'; I deleted some "#" and make it like this

>>>LIBTOOLIZE=libtoolize
>>>if [ `uname -s` = Darwin ]; then
>>>    LIBTOOLIZE=glibtoolize
>>>fi

6. After running libtoolize, you should see in ./bootstrap/log:
"...Now you are ready to run ./configure"

7. so let's run it:
./configure

8. Run:

make
cd build
premake4 gmake
cd gmake
make config=debugdoubledll

*9. *Run an ODE demo like demo-buggy, and it works, Hooray!

Running code Atkeson provides

Here is how to modify Makefiles that Atkeson creates:

1) Add

CPP=3Dg++
or
CPP=3Dc++
to Makefile

2) In Makefiles, you may need to say something like

XLIBS = -framework OpenGL -framework GLUT
or
XLIBS = -framework OpenGL -framework Carbon -framework AGL -Wl,-bind_at_load -lpthread
instead of what you would say in linux:
XLIBS = -lGLU -lGL -lX11

Delete #include "malloc.h" in all files