[ODE] { Newbie, Need a bit help }

Gary R. Van Sickle g.r.vansickle at worldnet.att.net
Tue Jun 14 00:12:33 MST 2005


> -----Original Message-----
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On 
> Behalf Of Jon Watte (ODE)
> Sent: Monday, June 13, 2005 7:37 PM
> To: hansolo7 at telepolis.com
> Cc: ode at q12.org
> Subject: Re: [ODE] { Newbie, Need a bit help }
> 
> 
> > i compile with 'gcc -g -Wall -o a.exe a.c' and the result is:
> > 
> > C:\>gcc -g -Wall -o a.exe a.c
> > c:/djgpp/tmp/cc4Eaym0.o: In function `main':
> > c://a.c:9: undefined reference to `_dWorldCreate'
> > collect2: ld returned 1 exit status
> > 
> > -->The same result i got it with my linux.
> > ---> Too i've installed from a Debian Package and ok, but works like
> > when i compiling ode.
> 
> 
> Why is it that people can't recognize a link error when they 
> see it, and 
> figure out what to do about it? Don't classes teach 
> compile/assemble/link/load anymore?
> 
> You probably need "-lode".
> 
> Cheers,

<semi-rant>
I don't get it either.  Even when I was a "newbie" about a billion years
ago, I was at least able to recognize that "ld" was the linker, and that I
had a linker problem.  Solving any and all of them (ok, 99%) involves:
finding the right library, then getting it on the command line.

To be fair, the tools ain't exactly blameless here.  The hard part above is
always "finding the right library".  Now, "_dWorldCreate" should really not
trip anybody up, but where does '_RandomWindowsFuncionFHFJ$^%$*@!(@^'
reside?  10% of the time a few minutes with the SDK help will tell you, 90%
of the time you're grepping nm output.

Since it is the 21st century, the minimum we should have by now (in addition
to the flying turbine-powered cars Popular Mechanics promised us) is an
error message from ld such as:

Whatever.c: Undefined reference to '_Blah'.  Function '_Blah' resides in the
following libraries: libfoo1.a, libbar2.a, etc etc

Hmmm... A bit o' perl scripting, a database of some sort, and a wrapper
around ld might be easy enough to put together... Might make a nice weekend
project for someone.
</semi-rant>

-- 
Gary R. Van Sickle
 



More information about the ODE mailing list