From: Matt R <nimrod99@dingoblue.net>
To: gcc-help@gcc.gnu.org
Subject: Problem with header files.
Date: Fri, 03 Aug 2001 16:32:00 -0000 [thread overview]
Message-ID: <01080409411301.19611@Hand_Of_God> (raw)
Dear GCC Gurus,
I have a problem getting GCC to refer to header files.
For example the following program....
------------Code Begins Here------------
#include <stdio.h>
#include <math.h>
main() {
float uno;
float duo;
uno=7.778;
duo=sqrt(uno);
printf("sqrt of %f is %f \n", uno, duo);
}
------------Code Ends Here--------------
Produces the following message at compile time...
[fakeuser@fakehost BeginC]$ gcc trial.c
/tmp/ccBm2UFL.o: In function `main':
/tmp/ccBm2UFL.o(.text+0x1b): undefined reference to `sqrt'
collect2: ld returned 1 exit status */
__________________________________________
What is going on? I would really appreciate your advice on this
one. I have to admit to being a newbie to C programing.
I have installed glibc 2.2.12 (full install), and gcc 2.9.6-85, and
am using RedHat 7.0 distro. The original versions of glibc gave the
same errors.
Looking forward to your advice...otherwise I will end up doin my
iminent assignments on DOS....a fate worse than death.
Matt Redding
next reply other threads:[~2001-08-03 16:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-03 16:32 Matt R [this message]
2001-08-03 16:43 ` David Berthelot
2001-08-03 16:49 ` Alexandre Oliva
2001-08-03 17:52 ` Problem with header files. YeHaaaaaa!!!!! Matt R
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=01080409411301.19611@Hand_Of_God \
--to=nimrod99@dingoblue.net \
--cc=gcc-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).