undefined reference to `floor`
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Sep 16 11:08:24 UTC 2013
On 2013-09-16 12:58, Peng Fan wrote:
>
> I do not know how to resolve this. I tried to pass `-lm` to gcc, but still
> failed to link.
>
>
> Can you please provide the full command line?
>
> /opt/rtems-4.11/bin/sparc-rtems4.11-gcc -qrtems
> -B/opt/rtems-4.11/sparc-rtems4.11/lib/
> -B/opt/rtems-4.11/sparc-rtems4.11/sis/lib/ --specs bsp_specs -mcpu=cypress -O2
> -g -Wall -Wmissing-prototypes -Wimplicit-function-declaration
> -Wstrict-prototypes -Wnested-externs init.c.5.o main.c.5.o fs-root-tarfile.o -o
> rtld.prelink -Wl-Bstatic -L. -lrtl -Wl,-Bdynamic
> This is the command. Thanks.
>
You definitely need -lm, just add it as the last option.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list