This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: pow(),cos() ....


On 26 Sep 2000 at 12:06 (+0200), Alex Kononov wrote:
| A very simple math c-program lile this
  
  [example snipped]

| udefined reference to 'pow'
| udefined reference to 'cos'
| 
| What am I doing whrong?

not linking to the math library. try this.

  gcc ctest.c -o ctest -lm

hth.
  b

-- 
Damon Brent Verner                        o      _     _         _
Cracker JackŪ Surprise Certified  _o     /\_   _ \\o  (_)\__/o  (_)
brent@rcfile.org                _< \_   _>(_) (_)/<_    \_| \   _|/' \/
brent@linux1.org               (_)>(_) (_)        (_)   (_)    (_)'  _\o_

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]