This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: problem with math
- To: "Matthew Zhang" <mathfield at hotmail dot com>
- Subject: Re: problem with math
- From: Kenneth Lareau <elessar at numenor dot org>
- Date: Thu, 14 Jun 2001 13:00:31 -0700
- cc: gcc-help at gcc dot gnu dot org
You need to link with '-lm'.
Ken Lareau
elessar@numenor.org
In message <F53VdRQh27mCfzL8Peu000056ef@hotmail.com>, "Matthew Zhang" writes:
>I have a source code file that include "math.h" and here's my problem:
>if I compile with
>gcc -g source.c, I get:
>Undefined first referenced
>symbol in file
>log /var/tmp/cch7Blh6.o
>exp /var/tmp/cch7Blh6.o
>ld: fatal: Symbol referencing errors. No output written to a.oujt
>
>if I compile with
>gcc -g -math source.c, I get
>cc1: Invalid option 'ath'
>
>this problem disappear when I compile with gcc using cygwin or dygpp which
>has gcc 2.953 with/without the -math option...but I need to do development
>in solaris, so instead of asking my administrator to upgrade the gcc, can I
>do anything about it???
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>