From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076450423499.tru64-unix-managers.marc@archive.invalid> From: marco () gore ! afep ! cornell ! edu Date: Wed, 29 Jan 1997 14:08:50 +0000 To: tru64-unix-managers Subject: SUMMARY:Compile errors - ld Unresolved X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076450423499 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 > >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" Olle Eriksson Baranyai Pal Gyula Szokoly "Eric Z. Ayers" Hans Ranke