Your message dated Sat, 26 Oct 2002 20:28:04 -0400
with message-id <[EMAIL PROTECTED]>
and subject line Bug#166543: libc6-dev: using GCC pow(x,y); does not compile.
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 26 Oct 2002 23:58:59 +0000
>From [EMAIL PROTECTED] Sat Oct 26 18:58:59 2002
Return-path: <[EMAIL PROTECTED]>
Received: from dsl-olugw3pfe.dial.inet.fi (linux.lan) [80.223.175.254] 
        by master.debian.org with esmtp (Exim 3.12 1 (Debian))
        id 185apW-0004Ls-00; Sat, 26 Oct 2002 18:58:58 -0500
Received: from azul by linux.lan with local (Exim 3.36 #1 (Debian))
        id 185aoi-0005AE-00; Sun, 27 Oct 2002 02:58:08 +0300
From: Jouko Kivilahti <[EMAIL PROTECTED]>
Subject: libc6-dev: using GCC pow(x,y); does not compile.
To: [EMAIL PROTECTED]
X-Mailer: bug 3.3.10.2
Message-Id: <[EMAIL PROTECTED]>
Sender: Jouko Kivilahti <[EMAIL PROTECTED]>
Date: Sun, 27 Oct 2002 02:58:08 +0300
Delivered-To: [EMAIL PROTECTED]
X-Spam-Status: No, hits=0.6 required=5.0
        tests=SPAM_PHRASE_00_01
        version=2.41
X-Spam-Level: 

Package: libc6-dev
Version: 2.3.1-3
Severity: important

Using pow(x,y); at source does not compile

--  a.c
#include <stdio.h>
#include <math.h>

int main()
{
    int a;
    a = pow(2,2);
    printf("%d\n",a);
    return (0);
}
--

$ gcc a.c
/tmp/cc2ik7lo.o(.text+0x1f): In function `main':
: undefined reference to `pow'
collect2: ld returned 1 exit status

it does compile with other (mingw32, other-os-compilers) compilers.

-- System Information
Debian Release: testing/unstable
Kernel Version: Linux linux.lan 2.4.18-386 #2 Sun Apr 14 10:38:08 EST 2002 i586 
Pentium 75 - 200 GenuineIntel GNU/Linux

Versions of the packages libc6-dev depends on:
ii  libc6          2.3.1-3        GNU C Library: Shared libraries and Timezone

---------------------------------------
Received: (at 166543-done) by bugs.debian.org; 27 Oct 2002 00:27:36 +0000
>From [EMAIL PROTECTED] Sat Oct 26 19:27:35 2002
Return-path: <[EMAIL PROTECTED]>
Received: from crack.them.org [65.125.64.184] (mail)
        by master.debian.org with esmtp (Exim 3.12 1 (Debian))
        id 185bHD-0007ZL-00; Sat, 26 Oct 2002 19:27:35 -0500
Received: from nevyn.them.org ([66.93.61.169] ident=mail)
        by crack.them.org with asmtp (Exim 3.12 #1 (Debian))
        id 185cCp-0005Fw-00; Sat, 26 Oct 2002 20:27:07 -0500
Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian))
        id 185bHg-0001rT-00; Sat, 26 Oct 2002 20:28:04 -0400
Date: Sat, 26 Oct 2002 20:28:04 -0400
From: Daniel Jacobowitz <[EMAIL PROTECTED]>
To: Jouko Kivilahti <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: Bug#166543: libc6-dev: using GCC pow(x,y); does not compile.
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[EMAIL PROTECTED]>
User-Agent: Mutt/1.5.1i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Status: No, hits=-12.5 required=5.0
        tests=IN_REP_TO,REFERENCES,SIGNATURE_SHORT_DENSE,
              SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_MUTT
        version=2.41
X-Spam-Level: 

On Sun, Oct 27, 2002 at 02:58:08AM +0300, Jouko Kivilahti wrote:
> Package: libc6-dev
> Version: 2.3.1-3
> Severity: important
> 
> Using pow(x,y); at source does not compile
> 
> --  a.c
> #include <stdio.h>
> #include <math.h>
> 
> int main()
> {
>     int a;
>     a = pow(2,2);
>     printf("%d\n",a);
>     return (0);
> }
> --
> 
> $ gcc a.c
> /tmp/cc2ik7lo.o(.text+0x1f): In function `main':
> : undefined reference to `pow'
> collect2: ld returned 1 exit status

Add -lm to your gcc command line.  This is documented...

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Reply via email to