This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: About log() in GCC


JN_Lin@utc.com.tw opined (on Wed, Sep 15, 1999 at 02:54:04PM +0800):
| 
| 
| Dear :
| When I want to use "log" in my program, I must include the header
| file math.h.  But when I compiler my program ,some message showing  as
| following:
| 
|     Undefined                       first referenced
|     symbol                             in file
|     log                                 /var/tmp/cca0060l1.o
|     ld: fatal: Symbol referencing errors. No output written to a.out
| 
| 
| My compiler command:
|        gcc 1.c
| 

Yeah, the header file is certainly one thing you need.  But how about
also including the math library:
	
	gcc 1.c -lm


-- 
Jean-Pierre Radley <jpr@jpr.com>  XC/XT Custodian   Sysop, CompuServe SCOForum

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]