home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!elroy.jpl.nasa.gov!ncar!breeze.rap.ucar.edu!rehak
- From: rehak@breeze.rap.ucar.edu (Nancy Rehak)
- Newsgroups: comp.lang.c
- Subject: Re: GNU gcc Compiler Question
- Message-ID: <1992Aug25.175942.15401@ncar.ucar.edu>
- Date: 25 Aug 92 17:59:42 GMT
- References: <1992Aug25.145142.5039@mksol.dseg.ti.com>
- Sender: news@ncar.ucar.edu (USENET Maintenance)
- Distribution: usa
- Organization: NCAR / RAP
- Lines: 28
-
- In article <1992Aug25.145142.5039@mksol.dseg.ti.com> katzn@mksol.dseg.ti.com (Neil M Katz) writes:
- >I have a few questions about the GNU gcc compiler.
- >
- >More specifically, I have found that when I compile a program
- >that refers to math functions such as pow or log10, I
- >get the following message from gcc:
- >ld: Undefined symbol:
- > _cos
- > _asin
- > _tan
- >collect: /usr/bin/ld returned 2 exit status
- >
- >I have included math.h, but still get these errors. Note that this
- >same file compiled successfully with Sun's acc compiler on
- >a SparcStation IPC.
- >
- >What am I doing wrong?
- >
- >Please post responses to this newsgroup or email me directly at
- >katzn@lobby.ti.com.
- >
- >Thanks,
- >Neil Katz
-
-
- You may want to include the math library (-lm) when you link.
-
- Nancy Rehak
-