C++ Builder and ODE Physics

72 views
Skip to first unread message

WagFeliz

unread,
Oct 9, 2009, 1:19:56 PM10/9/09
to ode-users
Hi Everyone,

I am trying to use ODE with C++ Builder, I know that this is possible
as in the website they talk about it :
http://opende.sourceforge.net/mediawiki-1.6.10/index.php/ODE_in_other_languages
But the last ODE V0.11.1 version that shipps with the name
ode-0.11.1.zip , don't have any lib files compiled.
Do anyone know how to compile the ODE using the C++ Builder 6 ?
Obs: Using the MSVS it works fine, but if you try to use this libs in
Builder, it crashs, even if you use the coff2omf.

Thanks !
Wagner.

Jon Watte

unread,
Oct 9, 2009, 6:25:41 PM10/9/09
to ode-...@googlegroups.com
WagFeliz wrote:
> Do anyone know how to compile the ODE using the C++ Builder 6 ?
>

How about just adding the C++ files to your project and building them?

Sincerely,

jw


--

Revenge is the most pointless and damaging of human desires.

WagFeliz

unread,
Oct 11, 2009, 8:44:01 AM10/11/09
to ode-users
Hi Pascal,

First of all, thanks for the reply !
When I try to compile adding all the c++ files, I get some errors
like :

[C++ Error] collision_cylinder_box.cpp(208): E2034 Cannot convert
'double *' to 'double[4]'
[C++ Error] collision_cylinder_box.cpp(208): E2342 Type mismatch in
parameter 'a' (wanted 'double ( &) const[4]', got 'double *')

The files I add : all files in the \ode\ode\src , didn't add the
joints dir.

The preprocessors : (Should I add any other preprocessors ?)
_DEBUG;WIN32;__CYGWIN32__;MSVC;dDOUBLE;fabsf=fabs;sinf=sin;cosf=cos;sqrtf=sqrt;atan2f=atan2;ODE_DLL;_CRT_SECURE_NO_DEPRECATE

Thanks !
Wagner.

Daniel K. O.

unread,
Oct 11, 2009, 10:57:24 AM10/11/09
to ode-...@googlegroups.com
.2009/10/11 WagFeliz <wagf...@yahoo.com.br>:

> The preprocessors : (Should I add any other preprocessors ?)
> _DEBUG;WIN32;__CYGWIN32__;MSVC;dDOUBLE;fabsf=fabs;sinf=sin;cosf=cos;sqrtf=sqrt;atan2f=atan2;ODE_DLL;_CRT_SECURE_NO_DEPRECATE

You should avoid making the compiler pretend to be another one
(__CYGWIN32__ and MSVC). ODE_DLL is unnecessary as you are building
ODE into your code.

And you will need the joints directory too.

About your compilation errors, I don't think C++ Builder is currently
being supported; meaning nobody is testing to see if it builds on
there. You might want to try adding some overloaded forms of the
problematic functions, with the proper type; it appears you need
"dVector3Length(dReal*)" to make your compiler happy.


--
Daniel K. O.
"The only way to succeed is to build success yourself"

WagFeliz

unread,
Nov 4, 2009, 12:25:08 PM11/4/09
to ode-users
Hi All,

Just to update this issue, for someone that needs to use C++ Builder 6
with ODE, following what I did to make this work :

1) Compile and generate the ODE dlls using the VS 2008, here you can
chouse to use Single ou Float Numbers, don't select Debug (Sorry, this
is the only way I found)
2) Copy the ODE DLL ( ex: ode_single.dll ) and drawstuff.dll ( Only if
you need it ) to your CBuilder project directory.
3) Execute the impdef (founded in the CBuilder Bin directory)
utility :::
-> impdef -a bcb_ode.def ode_single.dll
-> impdef -a bcb_drawstuff.def drawstuff.dll
4) Open the bcb_ode.def with notepad and delete the fist function
declaration ( don't know why my VS2008 create this, maybe is some
debug info, don't know ).
5) Execute the implib utility :::
-> implib -a ode_builder.lib bcb.def
-> implib -a drawstuff_builder.lib bcb_drawstuff.def
6) In your CBuilder project, just add the files ode_builder.lib and
drawstuff_builder.lib.
7) Include in your CBuilder projetct, the folder ODE/Include.
8) You need to fill this pre-compile header in the Project/Directorys
Conditionals configuration :
->
_DEBUG;WIN32;__CYGWIN32__;dSINGLE;fabsf=fabs;sinf=sin;cosf=cos;sqrtf=sqrt;atan2f=atan2;_CRT_SECURE_NO_DEPRECATE
9) Done, it should compile all the ODE/Include header files, and call
the functions from ODE DLL.

If anyone need helps, just send a mail ok ?
Thanks,
Wagner.


Reply all
Reply to author
Forward
0 new messages