Original:
>Hello managers,
> I get the following error when I try to compile a simple c program:
>
>gore.afep.cornell.edu 8:33am> gcc junk.c
>/usr/bin/ld:
>Unresolved:
>exp
>collect2: ld returned 1 exit status
>
>
>the exp above is the math function "e to the x". I have tried other math
>functions and they exhibit the same behavior. I have the math library header
>define,i.e. #include <math.h>
>
>I found a question similar to this in the archive but there was no summary. Ay
>help would be greatly appreciated. Thank you.
Many responded quickly. The answer was simple. Use:
gcc file.c -lm
Thanks to :
"Sean O'Connell" <sto_at_stat.Duke.EDU>
Olle Eriksson <olle_at_cb.uu.se>
Baranyai Pal <bp_at_vma.bme.hu>
Gyula Szokoly <szgyula_at_skysrv.Pha.Jhu.EDU>
"Eric Z. Ayers" <eric_at_compgen.com>
Hans Ranke <Hans.Ranke_at_Regent.E-Technik.TU-Muenchen.DE>
Received on Wed Jan 29 1997 - 15:23:21 NZDT