Has anyone tried using ODE with C++ and Pand3D. I am getting a lot of errors when I try to do so. The Panda manual does not seem to have much support for using ODE with C++. It would be great if someone could direct me in the right direction to get things to work.
After the first page there is no documentation on implementing it in C++, however that page did show how to add physics to a loaded Panda model. But when I try to compile, firstly it throws an error that it cannot find the ‘ode/ode.h’ file in ‘ode_includes.h’. I tried manual fixing that by dropping ode.h into a ode folder that I created in the ‘include’ folder in Panda3D install directory. But then it throws a bunch of errors about encountering structs which haven’t been defined.
I am pretty new to Panda3D so it might be something very silly that I am doing. Any help would be greatly appreciated. If you need any further info or a snapshot of the errors I am getting, let me know and I shall provide i to you. Thank you for helping me out.
Whoops, that’s right - panda does not ship with the ODE headers. You need to download the version of ODE that Panda was compiled against (I’m guessing its 0.9) and put all of the headers in the include path. (not just ode/ode.h)
Also, I see that the size of the ode.dll is different in the panda3d bin folder when I compare it to the releasedll in the ODE 0.9 source code. Could it be that Panda3d was compiled with another version? Will that lead the above linking error though?
Possibly. But it should be right if you use the version of ODE in the thirdparty packages on the download page - it includes the headers and dll. So that’s what I would try.
So I took the header files and ode.lib from the panda3d complete source code. But I am still getting the linker errors. I am pretty sure I am missing some .lib file which is causing this problem.
Here is how I included the ode.lib in my project:
I copied the ode.lib into the Panda3D-1.6.2\lib\ path.
I added the ode.lib under, Project properties->Linker->Input->Additional Dependencies, along with other panda framework library files.
Are there any other ode library files I need to add?
Oh, stupid me. I just realized that the symbol above is actually a symbol from Panda, not from ODE.
Try adding libpandaode.lib to your dependencies. I think you can remove ode.lib then as it’s statically linked, although I’m not 100% sure.
Awesome stuff pro-rsoft!!! I just included it and I was able to compile and NO Linker errors! Can’t wait to test all the physics now. Thanks a lot! You have been of great help!!