From: hlu@luke.eecs.wsu.edu (HJ Lu) Subject: Re: How to GCC part 2 Date: Fri, 16 Apr 1993 14:27:38 GMT
In article <1qm84u$jj1@obelix.uni-muenster.de> zy0004@obelix.uni-muenster.de (Martin Rehwald) writes:
>Hello out there.
>Me again.
>Yesterday I asked for help linking the math-libary using GCC.
>Many told me to use '-lm' instead of '-l m'. I did this before -
>and did not detect any difference in GCC's behaviour.
>Using AIX-GCC on rs6000 both works fine. With me none at all.
>By the way there is another funny observation:
> adding -l m.a causes the error: libm.a not found.
> this should be 'libm.a.a' not found, no?
>If you need further information:
> I'm using GCC-2.3.3, lib4.3.2, Linux-0.99.7
>
You should update to libc 4.3.3.
>OK.
>Waiting for more ideas,
I still don't know what you did. Please try
gcc -o foo foo.o bar.o .... xxx.o -lm
^^^^^
-lm has to be after those modules which use it.
H.J.