Making 64-bit ode.dll on Windows

56 views
Skip to first unread message

Riley Ilieva

unread,
Feb 15, 2021, 10:31:33 AM2/15/21
to ode-users
Hi all, 

Apologies if this is a basic question! I am looking to call the ODE library as a dll within LabVIEW as it is done here https://lavag.org/files/file/155-lvode/ and am mostly interested in the collision detection functions. The example in the link is for 32-bit dll but our application is 64 bit. 

Could any of your source code that is on Bitbucket be used to generate a dll file on Windows? 

Many Thanks, 

Riley 

Oleh Derevenko

unread,
Feb 15, 2021, 10:36:08 AM2/15/21
to ode-...@googlegroups.com

Hi Riley,

 

Yes, probably some could. What tools do you have for the compiling?

 

Oleh Derevenko

-- Skype with underscore
GPG Key Fingerprint: 2F56 32DC DCD9 B2BB 06E9 39E8 A37E 5E60 376E C691

openpgp-digital-signature.asc

Riley Ilieva

unread,
Feb 15, 2021, 10:42:36 AM2/15/21
to ode-users
Hi Oleh, 

Thank you for responding so quickly! I haven't done this before but it looks like there is enough information on how to compile it in Visual Studio IDE with C++ that I can follow. Would that work? 

Many Thanks, 

Riley 

Oleh Derevenko

unread,
Feb 15, 2021, 10:49:20 AM2/15/21
to ode-...@googlegroups.com

Yes, for Visual Studio there is build\premake4.exe executable to generate a solution for you. You have to run a command prompt and generate solution files. Check command line options (premake4.exe --help) and choose what you need to be included. It can generate vs2010 files you can then convert to the version you need with your Visual Studio. Build and use the DLL it will generate. If you would want to use the DLL from your program there are include headers in include\ode.

--
You received this message because you are subscribed to the Google Groups "ode-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ode-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ode-users/53dc496d-b91d-409f-84e8-081bcd8f8da8n%40googlegroups.com.

openpgp-digital-signature.asc

Riley Ilieva

unread,
Feb 16, 2021, 10:45:26 AM2/16/21
to ode-users
Hi Oleh, 

Thank you for the instructions, that was very helpful. I generated the vs2010 file, converted it to 2019 and then built the dll with no issues.

 I am still having trouble importing it into my program though as the declarations for a lot of functions and typedefs in particular cannot be found. Some of them like dReal I can define manually but not sure how I can do that with structures like dSpaceID. I have included the ode.h from the include folder which should include common.h where they are called. I am also including the paths to the ode src folder, VS tools and Windows SDK headers. Do you recognise anything I might be missing?

Many Thanks,   Riley 

Vaillancourt

unread,
Feb 16, 2021, 12:18:49 PM2/16/21
to ode-users
It looks like the compiler doesn't load ODE's header. Do you also have an error message telling it can't locate the header? Another way to see this is to show the includes when compiling, and making sure the right files are included: https://docs.microsoft.com/en-us/cpp/build/reference/showincludes-list-include-files?view=msvc-160

- Vaillancourt

Riley Ilieva

unread,
Feb 16, 2021, 12:44:09 PM2/16/21
to ode-users
Hi Vaillancourt, 

I'm attaching a screenshots of the paths I've defined and the messages (in the last one) . 

If I add dReal = double in the preprocessor definitions then the create box declaration is found but as void * dCreateBox(void *space, double lx, double ly, double lz); and then  the return is of an undefined type for my application. 

screenshot1.PNG

Screenshot2.PNG


Screenshot3.PNG

Thank you for your help!

Riley 

Riley Ilieva

unread,
Feb 16, 2021, 1:07:49 PM2/16/21
to ode-users
Also, thank you for the link, when building it looks like it didn't have any issues finding the header -
 
Screenshot4.PNG

Oleh Derevenko

unread,
Feb 16, 2021, 2:38:15 PM2/16/21
to ode-...@googlegroups.com

Hi Riley,

 

Add dIDEDOUBLE to your defines. If you are using libCCD also add CCD_IDEDOUBLE.
You should not define dReal manually.

openpgp-digital-signature.asc

Oleh Derevenko

unread,
Feb 16, 2021, 2:41:57 PM2/16/21
to ode-...@googlegroups.com

You should not import the library. Including ODE headers is enough to have all the functions and types declared.
You only have to add the DLL into the shared library list for your linker.

 

Oleh Derevenko

-- Skype with underscore
GPG Key Fingerprint: 2F56 32DC DCD9 B2BB 06E9 39E8 A37E 5E60 376E C691

 

From: ode-...@googlegroups.com <ode-...@googlegroups.com> On Behalf Of Riley Ilieva
Sent: Tuesday, February 16, 2021 8:08 PM
To: ode-users <ode-...@googlegroups.com>
Subject: Re: [ode-users] Making 64-bit ode.dll on Windows

 

Also, thank you for the link, when building it looks like it didn't have any issues finding the header -

 

 

openpgp-digital-signature.asc

Riley Ilieva

unread,
Feb 17, 2021, 4:40:26 AM2/17/21
to ode-users
Hi Oleh, 

Thank you! I'm not sure what you mean with the dIDEDOUBLE added to defines. Do you mean define it manually as double as I was trying to do with dReal? Apologies, I don't have much experience with this. 

I thought that only dll and header would be needed too but I get the error in the screenshot below about additional deader files missing, that is why I added the additional items to the list. 

Many Thanks, 

Riley 

Riley Ilieva

unread,
Feb 17, 2021, 4:41:08 AM2/17/21
to ode-users
Screenshot5.PNG

Oleh Derevenko

unread,
Feb 17, 2021, 5:41:23 AM2/17/21
to ode-...@googlegroups.com

 

Do it for each [Configuration X Platform] combination you have.

 

Oleh Derevenko

-- Skype with underscore
GPG Key Fingerprint: 2F56 32DC DCD9 B2BB 06E9 39E8 A37E 5E60 376E C691

 

From: ode-...@googlegroups.com <ode-...@googlegroups.com> On Behalf Of Riley Ilieva
Sent: Wednesday, February 17, 2021 11:40 AM
To: ode-users <ode-...@googlegroups.com>
Subject: Re: [ode-users] Making 64-bit ode.dll on Windows

 

Hi Oleh, 

image001.png
openpgp-digital-signature.asc

Riley Ilieva

unread,
Feb 17, 2021, 10:15:55 AM2/17/21
to ode-users
Hi Oleh, 

Thank you for the screenshot and arrows. They were already defined and still cannot find dReal. 

Many Thanks, 

Riley 

Oleh Derevenko

unread,
Feb 18, 2021, 10:18:05 AM2/18/21
to ode-...@googlegroups.com

How could they get into your project settings if you were not adding them there?

 

Oleh Derevenko

-- Skype with underscore
GPG Key Fingerprint: 2F56 32DC DCD9 B2BB 06E9 39E8 A37E 5E60 376E C691

 

From: ode-...@googlegroups.com <ode-...@googlegroups.com> On Behalf Of Riley Ilieva
Sent: Wednesday, February 17, 2021 5:16 PM
To: ode-users <ode-...@googlegroups.com>
Subject: Re: [ode-users] Making 64-bit ode.dll on Windows

 

Hi Oleh, 

 

Thank you for the screenshot and arrows. They were already defined and still cannot find dReal. 

 

Many Thanks, 

 

Riley 

On

openpgp-digital-signature.asc
Reply all
Reply to author
Forward
0 new messages