how to compile ODE (I am new to ODE)

68 views
Skip to first unread message

Daniel J A Bailey

unread,
Aug 9, 2009, 10:58:19 AM8/9/09
to ode-users
I am using lazarus/fpc, I want to be able to use ODE, I would asume
that the best way to do this would be to compile it to get a windows
dll (and a linux so file) and have a pascal unit that imports all of
the functions that I need from the dll.

Please help or suggest a better way to do it.
Message has been deleted

Buckeye

unread,
Aug 17, 2009, 5:26:57 PM8/17/09
to ode-users
I managed to get ODE ready for using, but have only done some very
prelim coding.

Here's what I did to compile ODE for Windows. (XP, using VS2003)
-downloaded ode-1.11.zip
-unzipped into [dir] - whereever you want. In the following, [dir]
represents the folder where the unzipped ODE now resides
-opened and read readme.txt, install.txt, etc.
-opened Command prompt window (Start->All Programs->Accessories-
>Command Prompt)
-cd [dir]/build
-at the command prompt, entered "premake4 --help" (no quotation marks)
and looked over the help info
-at the command prompt, entered "premake4 --all-collis-libs --with-
demos --with-tests vs2003" NOTE the double hyphens for options.
Instead of vs2003, enter your version of MSVS as listed with the --
help dump.
-a list of the projects were created
-exit command prompt window
-goto [dir]/build/vs 2003 (new directory created as a result of
premake4)
-opened ode.sln (MSVS solution) - this solution builds the whole ball
of wax.
-as I figured single precision is good enough for what I wanted to do,
in Solution Explorer window, clicked "ode solution"
-clicked on Project->Properties, click on Configuration Manager,
selected "DebugSingleDLL"
-built the whole mess (F7 or whatever your Build Solution hotkey is) -
sit back and relax, takes a couple of minutes to generate all the
libraries, dlls and demo and test executables
-goto [dir]\lib\debugsingledll - therein resides ode_singled.lib and
ode_singled.dll as well as the demo executables, etc.
-copied ode_singled.dll to windows/system32 dir for general dll
loading
-created a console app project in MSVS
-added "[dir]\include" to project->Properties->C/C++->General-
>Additional Include Directories
-added "[dir]\lib\debugsingledll" to Properties->Linker->General-
>Additional Library Directories
-added "ode_singled.lib" to Properties->Linker->Input->Additional
Dependencies
-added "#include ode/ode.h" to my main.cpp file for the project
-started playing around

On Aug 13, 2:39 am, Bryson Hilton <brysonhil...@gmail.com> wrote:
> HI I am a complete noob.  Please help me when you figure it out.  I am
> doing this on Windows.  Documentation doesn't make any sense.
>
> Bryson
>
> On Aug 9, 7:58 am, Daniel J A Bailey <daniel.bai...@hotmail.co.uk>
> > Please help or suggest a better way to do it.- Hide quoted text -
>
> - Show quoted text -

Buckeye

unread,
Aug 17, 2009, 6:22:52 PM8/17/09
to ode-users
Sorry to "double" post. Always add "dSINGLE" or "dDOUBLE" (depending
on which libary you're using) to Properties->C/C++->Preprosser-
>Preprocesser Definitions.

Daniel J A Bailey

unread,
Aug 18, 2009, 9:13:45 AM8/18/09
to ode-users
Thanks Buckeye, ODE is compiling now! (I am going to read up on
premake4 now...) ;-)

Thanks again, Great help.

Daniel J A Bailey

unread,
Aug 18, 2009, 9:25:46 AM8/18/09
to ode-users
When I build the solution in "release double dll" mode, where do I
find the dll file that visual studio just built? also I need a .so
file for linux, but I "should" be able to figure that out myself, I'll
let you know if I can't

Buckeye

unread,
Aug 18, 2009, 3:31:21 PM8/18/09
to ode-users
I haven't built a release version myself, but from the debug version,
I would
guess the new dll would in the [ODE]/lib/releasedoubledll folder.
Filename should be ode_double.dll.

FYI - I'm linux-impeared (an .so file is equivalent to dll, though,
correct?) so I can't help much with any actual operations.
Have you played around with the premake4 options? There's some
crossplatform stuff
there, including some linux options, output for gcc compilers, etc.

On Aug 18, 9:25 am, Daniel J A Bailey <daniel.bai...@hotmail.co.uk>
wrote:

Daniel K. O.

unread,
Aug 18, 2009, 5:30:47 PM8/18/09
to ode-...@googlegroups.com
Buckeye escreveu:

> FYI - I'm linux-impeared (an .so file is equivalent to dll, though,
> correct?) so I can't help much with any actual operations.
> Have you played around with the premake4 options? There's some
> crossplatform stuff
> there, including some linux options, output for gcc compilers, etc.

The preferred way to build ODE on unix systems is through the autotools
scripts (./configure && make && make install). Premake also works, but
it's more limited in some ways (no make install/uninstall nor
cross-compilation support, for example).

The autotools script has shared libraries disabled by default, so if you
really want a .so instead of a .a, pass the "--enable-shared" option to
./configure.


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

Daniel J A Bailey

unread,
Aug 19, 2009, 3:18:31 AM8/19/09
to ode-users
Found the DLL, just need to compile a SO file for linux now.
Reply all
Reply to author
Forward
0 new messages