[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Sheflug] gcc - problems with math functions.
Call me stupid, but I appear to be missing something here.
I`m attempting to compile a small C program for a uni course, which
uses
#include <math.h>
Whenever any lines involving maths functions are uncommented I get this
error:
[baz@shaitan baz]$ gcc versiontwo.c -o vtwo
/tmp/ccMNZCnt.o: In function `main':
/tmp/ccMNZCnt.o(.text+0x21b): undefined reference to `pow'
/tmp/ccMNZCnt.o(.text+0x239): undefined reference to `pow'
/tmp/ccMNZCnt.o(.text+0x24c): undefined reference to `sqrt'
/tmp/ccMNZCnt.o(.text+0x27e): undefined reference to `atan'
collect2: ld returned 1 exit status
notice I`m only using gcc source.c -o output_program - should I be
doing something else?
Baz.
--
Barrie J. Bremner
Email: TheEnglishman [at] ecosse.net
(PGP key available at my website)
URL: http://www.geocities.com/thefatenglishman
Telephone: UK 0131 313 3266
Mobile: UK 07968 792975
Quis custodiet ipsos custodes?
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.