Re: Undefined reference to 'fmod'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/11/06, James Colannino <james@xxxxxxxxxxxxx> wrote:
Hey everyone.  I included the math.h header, proceeded to use fmod(),
then got the following error:

/tmp/ccKQxpJi.o: In function `main':
04-03-calc.c:(.text+0x144): undefined reference to `fmod'
collect2: ld returned 1 exit status

Does anybody know why it won't link?  fmod() is a part of the standard
library.

Use the -lm switch to link against libm.a (the math library).

	\Steve
-
: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux