First, I know the readme is a mess, I really should have compiled and linked at least linux binaries, but I have linux only at work and well…
-
unpack ode e.g. to directory /tmp/ode
-
go to ode dir and do as the INSTALL file says
“cd /tmp/ode”
“cat INSTALL”
-
I am assuming that following commands went ok
“make configure”
“make ode-lib”
Now you should have a file /tmp/ode/lib/ode.so and plenty of *.o files under /tmp/ode/ode/src
-
Handle odejava-0.1.1-full.zip into /tmp
cd /tmp/ode
cp -a /tmp/odejava/net /tmp/ode
cd /tmp/odejava/net/java/dev/odejava/ode/
swig -Wall -java -c++ -package net.java.dev.odejava.ode odejava.i
cd /tmp/ode
-
compile odejava_wrap.cxx (at /tmp/ode)
g++ -c -I ‘d:\j2sdk1.4.2_01\include’ -I ‘d:\j2sdk1.4.2_01\include\win32’ -I include net/java/dev/odejava/ode/odejava_wrap.cxx -o net/java/dev/odejava/ode/odejava_wrap.o
- compile odejava.cpp (at /tmp/ode)
g++ -c -I ‘d:\j2sdk1.4.2_01\include’ -I ‘d:\j2sdk1.4.2_01\include\win32’ -I include net/java/dev/odejava/ode/odejava.cpp -o net/java/dev/odejava/ode/odejava.o
- link odejava.so library (at /tmp/ode)
If you run into problems, take exactly same command that “make ode-lib” does last, just add: net/java/dev/odejava/ode/odejava_wrap.obj and net/java/dev/odejava/ode/odejava.obj files to get everything linked, you may change the library’s name from ode.so also into odejava.so
Here’s the last commands example:
ar rc lib/javaode.a ode/src/array.o ode/src/error.o ode/src/memory.o ode/src/obstack.o ode/src/odemath.o ode/src/matrix.o ode/src/misc.o ode/src/rotation.o ode/src/mass.o ode/src/ode.o ode/src/step.o ode/src/stepfast.o ode/src/lcp.o ode/src/joint.o ode/src/timer.o ode/src/mat.o ode/src/testing.o ode/src/collision_kernel.o ode/src/collision_util.o ode/src/collision_std.o ode/src/collision_space.o ode/src/collision_transform.o ode/src/collision_quadtreespace.o ode/src/fastldlt.o ode/src/fastlsolve.o ode/src/fastltsolve.o ode/src/fastdot.o net/java/dev/odejava/ode/odejava_wrap.o net/java/dev/odejava/ode/odejava.o
Note that I tested above g++ commands succesfully on my cygwin machine (winxp), so change path’s to java includes.
I suggest that you do not ascend into /tmp/ode/net/java/dev/odejava/ode directory.
keep yourself in /tmp/ode as this is where the ode’s makefile also is. For some reason g++ does not find ode’s include files even though your path (…/…/…/…/…/include) seems ok.
I am 100% sure that it works on linux. Similar interface file has been used for creating bindings for ode, under linux.
You can also mail to my personal account if you have more questions about compiling.
If you get a working odejava.so, please email it to me and tell me what ODE version (or cvs date) are you using, also what configuration (single vs. double precision, opcode vs. non-opcode).
PS. I hope Xith3d people wont mind that this thread get’s a bit away from Xith, odejava still have no forums up as dev.java.net is pending.