All
Estou comecando a programar em C e surgiu u problema com o comando pow, para calcular potencia. Peguei em um site, http://www.cplusplus.com/ref/cmath/pow.html, um exemplo de programa que utilizava o comando pow, vide abaixo. O problema eh que quando eu tento compilar o programa, gcc -o pow pow.c, aparece as seguintes mensagens de erro : /tmp/cc0NeJeh.o: In function `main': /tmp/cc0NeJeh.o(.text+0x22): undefined reference to `pow' /tmp/cc0NeJeh.o(.text+0x58): undefined reference to `pow' /tmp/cc0NeJeh.o(.text+0x8e): undefined reference to `pow' collect2: ld returned 1 exit status Estou utilizando o debian gnu/linux unstable. ### pow.c ### /* pow example */ #include <stdio.h> #include <math.h> int main () { printf ("7 ^ 3 = %lf\n", pow (7,3)); printf ("4.73 ^ 12 = %lf\n", pow (4.73,12)); printf ("32.01 ^ 1.54 = %lf\n", pow (32.01,1.54)); return 0; } -- [ ]'s ******************* .''`. * [EMAIL PROTECTED] * : :' : * GNU/Linux Debian * `. `'` ******************* `- Gnupg ID 0x01186BE1 Key fingerprint =3D F17E 75C6 CE00 0E09 F63B 71B0 A0D2 FAD9 0118 6BE1 Fígaro! Fígaro! Fígaro! Fígaro-fí, Fígaro-fá, Fígaro-fí, Fígaro-fá! -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]