Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Please help configuring DGSDK with ODE

Author
Message
solo
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 12th Dec 2005 07:51
I had installed the binaries of the ODE engine, and would like
to use it with my DGSDK.
I want to use the interface of "ODEPhysics.h" that is supplied by
TGC (for the ODE-dll purpose) rather than the ODE's origin interface, but I have difficulties with setting.

Had anyone has any success with such a thing?

my spec:
VC++ 2003
DXSDK Oct 2005
ODE: ode-bin-0.5-msvc-SINGLE-release-trimesh
Kaiyodo
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: UK
Posted: 12th Dec 2005 12:23
I managed to get the ODE dll code working in DarkSDK at the weekend. I remember I had to #define DARKSDK_COMPILE (or something very similar, I don't have my code here right now) and comment out a duplicate g_pGlob pointer that conflicted in the dll code. I got it working anyway, and I have exactly the same setup as you. What problems are you having?

Kaiyodo.
solo
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 12th Dec 2005 19:48
These are the steps I took:
1. I've copied the camera sample project into a different name
2. I've deleted its content and replaced it with the following code:



3. Added an existing item to the project (ODEPhysics.cpp)
4. set project->directories->include with the path of "ODEPhysics.h", path of <ode-installed-dir>\include
5. set project->directories->lib with <ode-installed-dir>\lib

Except of the duplicated 'struct GlobStruct * g_pGlob' I get the following linker errors.
What have I missed?

OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 12th Dec 2005 21:02
Probably the path to the ODE library files...

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th Dec 2005 21:03
You aren't linking in the ODE libraries (*not* the DBPro/ODE layer). You need the ode.lib and opcode.lib files to be linked with your app.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
solo
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 12th Dec 2005 21:24
Thanks, I did link the odb.lib from the beginning, but surprisingly I have no such library as opcode.lib
Maybe I've missed something with the ODE configuration.
Kaiyodo
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: UK
Posted: 12th Dec 2005 21:43
The OPCODE library is optional as far as I remember, it's used in the trimesh collision (which I always found to be a little ropey with ODE anyway).

Adding #pragma comment (lib, "ode.lib") to the top of ODEPhysics.cpp should fix your linker errors, or you could add ode.lib to the project settings, same result in the end

Kaiyodo.
solo
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 12th Dec 2005 22:04

magics of compilink-ation... much thanks
solo
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 12th Dec 2005 23:15
I've "translated" the second ODE DBPro tutorial that was posted in last month magazine - into C++, it compiled, linked, ran and crashed.
When I commented out the ODE's commands it run ok.

Here is the code. Please try it and let me know whats wrong:

Kaiyodo
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: UK
Posted: 13th Dec 2005 20:33
That code runs fine for me unfortunately. I get a green plane and various objects fall on top of each other.

I've tried both Release and Debug and they both run fine here. Do you have any more information about the crash, like a call stack?

Kaiyodo.
solo
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 13th Dec 2005 21:33
YES!

It works! the #define DARKSDK_COMPILE has to be on top of
"ODEPhysics.cpp" and not in main.cpp as I put it before.

Thanks Kaiyodo
Kaiyodo
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: UK
Posted: 13th Dec 2005 23:22
Ah, I had DARKSDK_COMPILE in my project settings which is why it worked on mine. Glad you got it working

Kaiyodo.
Lampton Worm
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 16th Feb 2006 22:05
Hi,

Sorry for the probably obvious question, but where did you get the "ODEPhysics.h" file from?

Cheers
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 17th Feb 2006 10:28 Edited at: 17th Feb 2006 10:28
Hi,

I think you can get it from the DBPro 5.9 Update Page. Just download the EXTRAS from here:

http://darkbasicpro.thegamecreators.com/?f=upgrade_5_9

And here of course you get the ODE source:

http://www.ode.org

But don't ask me for help, I haven't used this yet...

greets,
Barnski.

-- I just started with DarkSDK, by translating DBP Projects. --
Lampton Worm
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 18th Feb 2006 16:42
Thanks Barnski
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 18th Feb 2006 20:07
You're welcome

-- I just started with DarkSDK, by translating DBP Projects. --

Login to post a reply

Server time is: 2024-11-19 04:41:46
Your offset time is: 2024-11-19 04:41:46