Bug#166543: marked as done (libc6-dev: using GCC pow(x,y); does not compile.)
Your message dated Sat, 26 Oct 2002 20:28:04 -0400
with message-id <20021027002804.GA7136@nevyn.them.org>
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 azul@azul.ath.cx Sat Oct 26 18:58:59 2002
Return-path: <azul@azul.ath.cx>
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 <azul@linux.lan>
Subject: libc6-dev: using GCC pow(x,y); does not compile.
To: submit@bugs.debian.org
X-Mailer: bug 3.3.10.2
Message-Id: <[🔎] E185aoi-0005AE-00@linux.lan>
Sender: Jouko Kivilahti <azul@azul.ath.cx>
Date: Sun, 27 Oct 2002 02:58:08 +0300
Delivered-To: submit@bugs.debian.org
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 drow@false.org Sat Oct 26 19:27:35 2002
Return-path: <drow@false.org>
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 <dan@debian.org>
To: Jouko Kivilahti <azul@linux.lan>, 166543-done@bugs.debian.org
Subject: Re: Bug#166543: libc6-dev: using GCC pow(x,y); does not compile.
Message-ID: <20021027002804.GA7136@nevyn.them.org>
References: <[🔎] E185aoi-0005AE-00@linux.lan>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[🔎] E185aoi-0005AE-00@linux.lan>
User-Agent: Mutt/1.5.1i
Delivered-To: 166543-done@bugs.debian.org
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 to: