"I Ketut Mahaindra B." wrote:

> Halo, semuanya ...
>
> Saya punya masalah kecil ...
> saya buat program kecil berikut di linux ...
>
> /* file : testmath.c */
> #include <math.h>
> #include <stdio.h>
>
> int main()
> {
>   double nump,nume;
>
>   nump = pow(1.5,2.5);  /* nump = 1.5 ^ 2.5 */
>   nume = exp(2.3);
>   printf("Test power : %f \n",nump);
>   printf("Test exponensial : %f \n",nume);
>
>   return 0;
> }
>
> Program di-compile dengan gcc,
>
> gcc -o test testmath.c
>
> saat compile tidak ada masalah,
> tapi waktu link pow(), dan exp()
> tidak ditemukan ... !!!
> -- undefined reference to pow
> -- undefined reference to exp
>
> Padahal di manual (man pow, man exp)
> fungsi pow() dan exp() ada di <math.h>
>
> Tapi saya iseng-iseng cari di math.h
> nggak ada tuh pow(), atau exp()
>
> Kenapa ya ... ???
> Bug atau ada yang salah ???

krn anda tidak kasih link ke math libnya, coba:
"gcc -o test testmath.c -lm", jangan buru2 nge-bug aaargh :>),

Best regards,
Andy

--
      // chandy a7 indo 607 net 607 id  -------/
    //     Linux kernel 2.2.5   XFree86 3.3.2.3
  //    Glib/Gtk 1.2.2      Enlightenment 0.16
//   Mozilla 4.51                    -------/




--------------------------------------------------------------------------------
Utk berhenti langganan, kirim email ke [EMAIL PROTECTED]
Informasi arsip di http://www.linux.or.id/milis.php3
Pengelola dapat dihubungi lewat [EMAIL PROTECTED]
Hosted by http://www.Indoglobal.com

Kirim email ke