From: Joachim Bauernberger <nuklear@singnet.com.sg>
To: help-gcc@gnu.org
Subject: howto sqrt?
Date: Fri, 31 Dec 1999 22:24:00 -0000 [thread overview]
Message-ID: <384CD454.A7C437C@singnet.com.sg> (raw)
Message-ID: <19991231222400.AxTNq4QLUHMaI2z7uBoXwDLSBgeUnl8QxPQL4bcuV7A@z> (raw)
hi!
i'm pretty new using the gcc. most of my programming sofar has been
under windoze 8-( using the borland tools.
unfortunatly i am not able to use the sqrt or pow function. can anybody
tell me what i'm doing wrong here?
if i compile the following c program using the compiler options: gcc -g
-D_GNU_SOURCE -Wall filename.c -o outputfile
i get these errors: undefined reference to 'sqrt'
my simple test program looks like this:
#include <stdio.h>
#include <math.h>
int main ()
{
double x = 900;
printf("\nSquare root of x = %f\n", sqrt(x));
return 0;
}
and it's the same with pow:
double x = 5, y;
y = pow(x,2);
printf("\n%g\n",y);
gives me undefined reference to pow??????
i'm sorry for boring you with newbie stuff like that.
i'd really appreaciate if anybody could help me out.....
thank's joachim!
next reply other threads:[~1999-12-31 22:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-07 1:36 Joachim Bauernberger [this message]
1999-12-07 1:50 ` haha
1999-12-07 7:34 ` Joachim Bauernberger
1999-12-31 22:24 ` Joachim Bauernberger
1999-12-31 22:24 ` haha
1999-12-31 22:24 ` Joachim Bauernberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=384CD454.A7C437C@singnet.com.sg \
--to=nuklear@singnet.com.sg \
--cc=help-gcc@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).