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: Viktor Pavlenko <vp@example.com>
- Date: Wed, 31 Jan 2001 13:15:49 +0900
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=iso-2022-jp
- In-Reply-To: <20010130225927.2d8aadcb.davidgn@example.com>
- References: <20010131121646.2310.AKAMINE@example.com><20010130225927.2d8aadcb.davidgn@example.com>
- Reply-To: tlug@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <HPLJ1D.A.XeG.SA5d6@example.com>
- Resent-Sender: tlug-request@example.com
>>>>> On Tue, 30 Jan 2001 22:59:27 -0600, David Eduardo Gomez Noguera <davidgn@example.com> said: DEGN> On Wed, 31 Jan 2001 12:30:54 +0900 DEGN> Hector Akamine <akamine@example.com> was chatting DEGN> the other day about l and said: DEGN> The problem is "pow" is not declared on math.h (at least it DEGN> doesnt appeara on my header files either, and its redhat's DEGN> glibc. dont know if redhat screw something, or if glibc is DEGN> laggin it. bits/mathcalls.h contains the pow's prototype and is included by math.h. There's some #define magic going on there. math.h: /* The file <bits/mathcalls.h> contains the prototypes for all the actual math functions. These macros are used for those prototypes, so we can easily declare each function as both `name' and `__name', and can declare the float versions `namef' and `__namef'. */ DEGN> pow does appear in the info pages, but it doesnt say what header it requires. pow man page here (RH 6.2) does say you have to include math.h Viktor >> 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 >> DEGN> -- DEGN> ICQ: 15605359 Bicho DEGN> =^..^= DEGN> First, they ignore you. Then they laugh at you. Then they fight you. Then you win. Mahatma Gandhi. DEGN> ........Por que no pensaran los hombres como los animales? Pink Panther........ DEGN> -------------------------------気検体の一致------------------------------------ DEGN> 暑さ寒さも彼岸まで。 DEGN> アン アン アン とっても大好き DEGN> ----------------------------------------------------------------------- DEGN> Next Nomikai Meeting: Fri, February 16 19:30- Tengu Tokyo Eki Mae DEGN> Next Technical Meeting: March (date TBA) DEGN> ----------------------------------------------------------------------- DEGN> more info: http://www.tlug.gr.jp Sponsor: Global Online Japan
- Follow-Ups:
- Re: problems with pow( ) in gcc
- From: David Eduardo Gomez Noguera <davidgn@example.com>
- References:
- problems with pow( ) in gcc
- From: Hector Akamine <akamine@example.com>
- Re: problems with pow( ) in gcc
- From: David Eduardo Gomez Noguera <davidgn@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: problems with pow( ) in gcc
- Next by Date: Re: shell state of mind
- Prev by thread: Re: man or Info? Both!! [was: 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