public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* math.h
@ 2005-07-31 18:01 sofia takayama
2005-07-31 18:03 ` math.h Andrew Pinski
0 siblings, 1 reply; 4+ messages in thread
From: sofia takayama @ 2005-07-31 18:01 UTC (permalink / raw)
To: gcc-bugs
#include <stdio.h>
#include <math.h>
int main()
{
printf("cos(1)= %f \n", cos(1));
}
After compile:
undefined reference to "cos"
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: math.h
2005-07-31 18:01 math.h sofia takayama
@ 2005-07-31 18:03 ` Andrew Pinski
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Pinski @ 2005-07-31 18:03 UTC (permalink / raw)
To: sofia takayama; +Cc: gcc-bugs
On Jul 31, 2005, at 1:35 PM, sofia takayama wrote:
> #include <stdio.h>
> #include <math.h>
> int main()
> {
> printf("cos(1)= %f \n", cos(1));
> }
>
> After compile:
>
> undefined reference to "cos"
Link with -lm.
-- Pinski
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: math.h
[not found] <Pine.LNX.4.20.0003061610560.19279-100000@hades.utp.edu.co>
2000-03-06 13:25 ` math.h celio
@ 2000-03-06 15:13 ` Martin v. Loewis
1 sibling, 0 replies; 4+ messages in thread
From: Martin v. Loewis @ 2000-03-06 15:13 UTC (permalink / raw)
To: celio; +Cc: egcs-bugs
> when i try to use any function from math.h pow, sin, cos, etc, i get the
> following message: /tmp/cc5Ig4Rz.o: In function `main':
> /tmp/cc5Ig4Rz.o(.text+0x15): undefined reference to `sinl'
You need to link with -lm.
Martin
>From pfeifer@dbai.tuwien.ac.at Mon Mar 06 15:29:00 2000
From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
To: Nathan Sidwell <nathan@codesourcery.com>
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: (C++) Incorrect new warning?
Date: Mon, 06 Mar 2000 15:29:00 -0000
Message-id: <Pine.BSF.4.21.0003070027330.13245-100000@deneb.dbai.tuwien.ac.at>
References: <38C3D2E3.A919D35C@codesourcery.com>
X-SW-Source: 2000-03/msg00290.html
Content-length: 420
On Mon, 6 Mar 2000, Nathan Sidwell wrote:
> I've committed the attached obvious fix, and testcase so this can never
> happen again (TM).
Thanks for the fix and the terrific turn-around time, once again! :-)
Gerald
PS: I verified that also the bigger project I extracted my example from
now compiles without any superflous warnings.
--
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
^ permalink raw reply [flat|nested] 4+ messages in thread
* math.h
[not found] <Pine.LNX.4.20.0003061610560.19279-100000@hades.utp.edu.co>
@ 2000-03-06 13:25 ` celio
2000-03-06 15:13 ` math.h Martin v. Loewis
1 sibling, 0 replies; 4+ messages in thread
From: celio @ 2000-03-06 13:25 UTC (permalink / raw)
To: egcs-bugs
please send me the answer to:
gmontes@utp.edu.co or celio@linux.utp.edu.co
On Mon, 6 Mar 2000 celio@hades.utp.edu.co wrote:
> when i try to use any function from math.h pow, sin, cos, etc, i get the
> following message: /tmp/cc5Ig4Rz.o: In function `main':
> /tmp/cc5Ig4Rz.o(.text+0x15): undefined reference to `sinl'
> /tmp/cc5Ig4Rz.o(.text+0x59): undefined reference to `csinl'
> /tmp/cc5Ig4Rz.o(.text+0x8e): undefined reference to `sin'
> /tmp/cc5Ig4Rz.o(.text+0xd1): undefined reference to `csin'
> /tmp/cc5Ig4Rz.o(.text+0x102): undefined reference to `sinf'
> /tmp/cc5Ig4Rz.o(.text+0x141): undefined reference to `csinf' collect2: ld
> returned 1 exit status when i use "tgmath.h" or the following if i use
> math.h:
> /tmp/ccLaU4pw.o: In function `main': /tmp/ccLaU4pw.o(.text+0xb):
> undefined reference to `sin'
> collect2: ld returned 1 exit status
>
> the source code is:
> #include <math.h> #include <stdio.h>
>
> int main() {
> printf("%lf\n", sin(1));
> return 0;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-07-31 18:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-31 18:01 math.h sofia takayama
2005-07-31 18:03 ` math.h Andrew Pinski
[not found] <Pine.LNX.4.20.0003061610560.19279-100000@hades.utp.edu.co>
2000-03-06 13:25 ` math.h celio
2000-03-06 15:13 ` math.h Martin v. Loewis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).