Здравствуйте!

Возникла странная проблема.

--(~/calc_with_fedotchev/calc/experimental)--
-->cat test.c
#include <math.h>
#include <stdio.h>

int main()
{
 double res;
 double inp = 3.1415;
 res = ceil(inp);
 return 0;
}
--(~/calc_with_fedotchev/calc/experimental)--
-->gcc -o test test.c
/tmp/cc41kOdl.o: In function `main':
test.c:(.text+0x21): undefined reference to `ceil'
collect2: ld returned 1 exit status

Почему этот код не компилируется? При этом
g++ -o test test.c
работает нормально. Debian Lenny 5.0.1, gcc из репозитория.
В чём может быть проблема?

Заранее спасибо.


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Ответить