Advertisement Jump to content
Sign in to follow this  

Compiling ode

This topic is 4909 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey When I try to compile ODE with my engine I get errors strating: ode/collision_trimesh_box.o:collision_trimesh_box.cpp:(.text+0x1fac): undefined reference to `IceMaths::InvertPRMatrix(IceMaths::Matrix4x4&, IceMaths::Matrix4x4 const&)' ode/collision_trimesh_box.o:collision_trimesh_box.cpp:(.text+0x20c6): undefined reference to `Opcode::OBBCollider::Collide(Opcode::OBBCache&, IceMaths::OBB const&, Opcode::Model const&, IceMaths::Matrix4x4 const*, IceMaths::Matrix4x4 const*)' ode/collision_trimesh_box.o:collision_trimesh_box.cpp:(.text+0x21db): undefined reference to `IceCore::Container::~Container()' ode/collision_trimesh_box.o:collision_trimesh_box.cpp:(.text+0x28be): undefined reference to `Opcode::MeshInterface::VertexCache' ode/collision_trimesh_box.o:collision_trimesh_box.cpp:(.text+0x28c7): undefined reference to `Opcode::MeshInterface::VertexCache' I tend to be able to sort these probs out by now, but I can't think of any lib I've missed, could it be the build order? cheers

Share this post

Link to post
Share on other sites
Some features of ODE, like trimeshes, are available only if you compile at first time the third party library called OPCODE. It's distributed with ODE.

Share this post

Link to post
Share on other sites
Yes, OPCODE must be compiled first, then ODE will compile fine. ODE use trimeshes if a switch is set somewhere in the makefile.

Share this post

Link to post
Share on other sites
Ok, this is what I did (using dev-cpp):
1. Added ODE, OPCODE and ICE source + headers to my project.
2. Rebuilt my project (as a dll).

Now, to have my game use the modified engine I linked the newly created lib and put the dll in the same folder.

But... now I get linker errors when I rebuild my game eg.:

main.o:main.cpp:(.text+0x141): undefined reference to `dGeomGetBody'

main.o:main.cpp:(.text+0x14f): undefined reference to `dGeomGetBody'
main.o:main.cpp:(.text+0x1fe): undefined reference to `dCollide'
main.o:main.cpp:(.text+0x253): undefined reference to `dJointCreateContact'
main.o:main.cpp:(.text+0x275): undefined reference to `dJointAttach'
main.o:main.cpp:(.text+0x2f6): undefined reference to `dBodyAddForce'
main.o:main.cpp:(.text+0x321): undefined reference to `dSpaceCollide'
main.o:main.cpp:(.text+0x337): undefined reference to `dWorldStep'
main.o:main.cpp:(.text+0x344): undefined reference to `dJointGroupEmpty'
main.o:main.cpp:(.text+0x39c): undefined reference to `dWorldCreate'
main.o:main.cpp:(.text+0x3ad): undefined reference to `dHashSpaceCreate'
main.o:main.cpp:(.text+0x3be): undefined reference to `dJointGroupCreate'
main.o:main.cpp:(.text+0x3eb): undefined reference to `dWorldSetGravity'
main.o:main.cpp:(.text+0x41c): undefined reference to `dCreatePlane'
main.o:main.cpp:(.text+0x461): undefined reference to `dBodyCreate'
main.o:main.cpp:(.text+0x497): undefined reference to `dMassSetBox'
main.o:main.cpp:(.text+0x4ba): undefined reference to `dMassAdjust'

main.o:main.cpp:(.text+0x4df): undefined reference to `dBodySetMass'
main.o:main.cpp:(.text+0x538): undefined reference to `dBodySetPosition'

main.o:main.cpp:(.text+0x64f): undefined reference to `dCreateBox'
main.o:main.cpp:(.text+0x68e): undefined reference to `dGeomSetBody'
main.o:main.cpp:(.text+0x6ee): undefined reference to `dBodyGetPosition'
main.o:main.cpp:(.text+0x7d7): undefined reference to `dJointGroupDestroy'

main.o:main.cpp:(.text+0x7e4): undefined reference to `dSpaceDestroy'
main.o:main.cpp:(.text+0x7f1): undefined reference to `dWorldDestroy'
main.o:main.cpp:(.text$_ZN5dMassC1Ev[dMass::dMass()]+0xd): undefined reference to `dMassSetZero'
collect2: ld returned 1 exit status

why is this?


Share this post

Link to post
Share on other sites
Is it possible that maybe you compiled opcode and called it ode.dll? I think opcode and ode should be two seperate projects (both projects can be in the same solution however). Make sure you compile opcode first, then reference that when compiling ode. I could never get a ode with trimesh enabled compiled, but that was about a year ago now. You can download ode already compiled for msvc or a few other compilers.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!