This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
About log() in GCC
- To: gcc at gcc dot gnu dot org
- Subject: About log() in GCC
- From: JN_Lin at utc dot com dot tw
- Date: Wed, 15 Sep 1999 14:54:04 +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
My program:
#include <stdio.h>
#include <math.h>
void main()
{
double x = 100;
printf("Var=%f \n" , log(x)) ;
}
Patrick-Lin
Thanks