Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!usenet.ins.cwru.edu!cleveland.Freenet.Edu!cc465 From: cc465@cleveland.Freenet.Edu (Steven M Ratliff) Newsgroups: comp.os.386bsd.bugs Subject: can't use function exp() in math.h Date: 2 Aug 1993 05:31:36 GMT Organization: Case Western Reserve University, Cleveland, OH (USA) Lines: 19 Message-ID: <23i8ro$l8d@usenet.INS.CWRU.Edu> Reply-To: cc465@cleveland.Freenet.Edu (Steven M Ratliff) NNTP-Posting-Host: slc10.ins.cwru.edu I've been trying to use the function exp() in math.h in a simple program under 386BSD + pk 2.4. I've put in #include <math.h> at the top of the program but always get an error message when linking. The error is. "Undefined symbol _exp referenced from text segment". I've explicitly tried linking in the math lib with cc -lm test.c and it still produces this error message. Then I tried cc -E test.c and looked at the output and it does show a valid prototype for double exp(double) ; in the output. I then took a look at math.h and the entry for exp looked okay to me (though I'm no expert). I also did an ar -t libm.a and it shows an exp.o file in the library. The funny thing is that I am also using a call to fabs() in math.h and it doesn't complain about that. If I remove the call to exp() the program compiles and links just fine. I'm at my wits end with this. Am I doing something stupid? or is there a problem here. -- ------------------------------------------------------------------------- cc465@cleveland.freenet.edu "When all was said and done, more was <Steve Ratliff> or said than done." -??? stever@wariat.org ------------------------------------------------------