www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/16/03:20:27

From: "Michael Schuster" <SCHUSTER AT merlin DOT e-technik DOT uni-erlangen DOT de>
Organization: LS f. Elektrische Energieversorgung
To: kagel AT quasar DOT bloomberg DOT com, djgpp AT delorie DOT com
Date: Tue, 16 Jan 1996 09:02:56 MET
Subject: Re: Peter: again!! Undefined reference to 'sin' this time

Gruess Dich!
 Your programm Sine.c:
 
>    #include <math.h>
>    #include <stdio.h>
>    main ()
>    {
>    float d = 40.05;
>    float n ;
>    n = sin( d ) ;
>    printf("The sine of %f is %f", d, n);
>    return(0);
>    }

will work fine, if you use ggc sine.c -lm. (Note, the libaryoption is 
-lm not -lmath)

Hope that helps

Michi


'Bye, bye Mister Pride' (ABC, Night you murdered Love)
----------------------------------------------------------------------
Dipl.-Ing                                       
Michael Schuster
Lehrstuhl fuer Elektrische Energieversorgung
Friedrich Alexander Universitaet Erlangen
Cauerstrasse 4
(0)9131 85 8762
----------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019