#include <math.h>
Michl Ladislav
xmichl03 na stud.fee.vutbr.cz
Pátek Červen 8 22:09:46 CEST 2001
On Tue, 22 May 2001, www wrote:
> V Jazyku C som sa pokusal nakopnut nejake matematicke funkcie.
> Napisal som program math.c:
>
> #include <stdio.h>
> #include <math.h>
> main()
> {
> printf("%f \n", ceil(8.56));
> }
>
> Chcel som ho skompilovat gcc math.c lenze vypisal toto:
>
> /tmp/ccRnQN7E.o: In function 'main' :
> /tmp/ccRnQN7E.o(.text+0xe): undefined reference to 'ceil'
> collect2: ld returned 1 exit status
>
> Myslel som, ze kniznicu nemam nainstalovanu lenze math.h je umiestnena
> /usr/include/math.h
hlavičkový soubor není knihovna...
$ gcc -lm math.c
hezký večer,
Laďa
Další informace o konferenci Linux