Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: problems with pow( ) in gcc
- To: tlug@example.com
- Subject: Re: problems with pow( ) in gcc
- From: "Thomas O'Dowd" <tom@example.com>
- Date: Wed, 31 Jan 2001 12:44:03 +0900
- Content-Disposition: inline
- Content-Type: text/plain; charset=us-ascii
- In-Reply-To: <20010131121646.2310.AKAMINE@example.com>; from akamine@example.com on Wed, Jan 31, 2001 at 12:30:54PM +0900
- References: <20010131121646.2310.AKAMINE@example.com>
- Reply-To: tlug@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <RPWvx.A.fRG.yn4d6@example.com>
- Resent-Sender: tlug-request@example.com
- User-Agent: Mutt/1.2.5i
try $gcc -lm -o test test.c you need to include the math libs. Tom. On Wed, Jan 31, 2001 at 12:30:54PM +0900, Hector Akamine wrote: > I was trying to compile this simple program. The gcc compiler is the one > included in Vine Linux 2.0 > > ------- program begin ---------- > > #include <stdio.h> > #include <math.h> > > int main() { > double maxi; > > printf("pow test:"); > maxi = pow (2.0, 5.0 ); > printf("%f\n",maxi); > > } > > ------- program end ---------- > > But the compiler throws the following error: > > ------- begin -------- > $ gcc -o test test.c > > > /tmp/ccfCPb5f.o: In function `main': > /tmp/ccfCPb5f.o(.text+0x22): undefined reference to `pow' > collect2: ld returned 1 exit status > > -------- end --------- > > What am I doing wrong? > > > Thanks in advance > > ----------------------------------------------------------------------- > Next Nomikai Meeting: Fri, February 16 19:30- Tengu Tokyo Eki Mae > Next Technical Meeting: March (date TBA) > ----------------------------------------------------------------------- > more info: http://www.tlug.gr.jp Sponsor: Global Online Japan > -- Thomas O'Dowd Noop-de-Noop! tom@example.com http://www.nooper.com
- References:
- problems with pow( ) in gcc
- From: Hector Akamine <akamine@example.com>
Home | Main Index | Thread Index
- Prev by Date: problems with pow( ) in gcc
- Next by Date: Re: problems with pow( ) in gcc
- Prev by thread: problems with pow( ) in gcc
- Next by thread: Re: problems with pow( ) in gcc
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links