I am trying to start with the simplest of the simplest in starting with Ode (I want to work with Ode by itself a bit first before I try to tackle OgreOde) yet I cannot seem to get it to properly compile, here is the code:
[bana@localhost play]$ g++ -W -L/usr/local/lib/ode/ ode_test.cpp -o ode
/tmp/ccrZXwin.o(.text+0x1d): In function `main':
: undefined reference to `dWorldCreate'
/tmp/ccrZXwin.o(.text+0x2b): In function `main':
: undefined reference to `dWorldDestroy'
/tmp/ccrZXwin.o(.text+0x33): In function `main':
: undefined reference to `dCloseODE'
collect2: ld returned 1 exit status
ode still seems to be linking though as if I comment out all the function calls (only leaving the dWorldID bana_world;) it works fine (but not if I then uncomment the include ode.h).
dWorldID is just a typedef in the ODE headers (IIRC) so that'll compile correctly even without linking to the ODE library. The other problems are linking errors, so you're either not linking to ODE, or you're not linking to a compatible library.
I'm no expert on Linux (I assume that's where you're compiling it) but don't you need something like this?
Oops, well that works, I thought that linking to the folder itself would be enough, but apparently I miscalculated (I didn't even need that -L/usr/local... stuff).
Okay thanks Monster, until next time.
(boy am I glad that this is in the Back to Basics Forum and not somewhere else )