This has come like a bolt out of the blue ... but I have to say a most welcome one .. I was starting to think I was the only one out there interested in getting a physics engine up and running in DARKGDK.
First and foremost, I'm no C++ programmer, but have had some considerable C programming experience in the past so moving from Dark Basic to C++ seemed a really sensible move as C++ IMHO combines the best in speed with superb object oriented functionality.
As I couldn't find any evidence on the forum of anyone successfully integrating a physics engine into DARKGDK I decided rather than tackle the raw ODE interface straight away, I'd see if I could port what I had done so far in Dark Basic using the ODE plug-in.
My initial approach, much along the lines of Jason's comments, was to simply add the readily available source code for the Dark Basic ODE plug-in into my project and statically link it into the ODE libraries, after all they are both written in C++. However, as Red has indicated via his link to my previous thread on this matter, I have hit problems which I have still no managed to surmount seemingly to do with the calling convention used by some of the code encapsulated in the ODE library.
So I decided, seeing that all of the source code is available for ODE to build my own static library and include that in my project. This initially seemed to work and except for having to use /FORCE:MULTIPLE to resolve some run time library conflicts I encountered, produced no errors. However, I soon encountered problems when attempting to call ODE_GetBodyLinearVelocityY function. This just hangs the ODE Loop and the only debug info I have managed to get is a simple text output of the first value returned which is nonsense. Attempts to do any serious debugging just seem to hang the app.
My new stance, is to remove the requirement to link to the static libraries altogether by including all the source code in my project so I can hopefully build a debug version that is stable. I am currently in the middle of doing this and whittling down the number of initial build errors. I'll let you know if I succeed.
By the way, I also had to fix various issues with the Dark Basic ODE Plug-in code which failed to compile initially in Visual C++ 2005 Express including modifying a couple of functions which I could never see as having worked, so perhaps there are issues with the maintenance of Code or different compiler issues!
Anyhow, sorry to babble on so much, would be really interested in any input or experience you guys could provide.
I have to say, I'm not entirely convinced I'll stay with ODE. If I can't eventually get the eliptical and or trimesh to trimesh collision up and running then I'll probably be looking else where. Does anyone have any feedback on Newton, Tokamak or PhysX (now that its free)?
No matter how good your code is, someone will improve on it