SUMMARY:Compile errors - ld Unresolved

From: <marco_at_gore.afep.cornell.edu>
Date: Wed, 29 Jan 97 09:08:50 -0500

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

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:47 NZDT