[ODE] Newbie: gcc apparently not finding libode.a
Frank Schoep
fschoep at zeelandnet.nl
Thu Dec 12 14:09:01 2002
Hello everyone,
I'm having a problem creating an application using ODE. I have succesfully
configured and compiled lib-ode. I've copied libode.a to /usr/lib/libode.a
(I'm using Mandrake 8.2 on x86). The include files are copied to
/usr/include/ode, and they work well. I wrote this small test file to see if
the library was working:
/* main.c */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ode/ode.h>
int main(int argc, char* args[])
{
// create world
dWorldID world;
dWorldSetERP (world, 0.01);
return 0;
}
I compile it using the command:
gcc -L/usr/lib/ -lode -oodetest main.c
I've tried about everything with the -l and -L switches, but I keep getting
the following error:
/tmp/ccUXVR2r.o: In function `main':
/tmp/ccUXVR2r.o(.text+0x17): undefined reference to `dWorldSetERP'
collect2: ld returned 1 exit status
I'm not quite sure what I'm doing wrong. As I said, make lib-ode went fine
and I do get a library. I've copied it, I think I've included it the right
way (I'm not getting any errors about missing include files, and the
dWorldID type is compiling without problems). I'm a bit newbie-ish on using
libraries, so maybe I'm missing a simple point. Other libs, like m work
fine.
Can anyone help me? I'm using the latest cvs version (downloaded 12 december
2002, 21:00 GMT+01:00). I am really interested in using ODE, it looks great
for what I am planning to do!
Sincerely,
Frank Schoep