Re: gcc 2.95.3 linker problems

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

 



Hi Jakob,

GCC does not normally include the math LIBRARY (libm.a or libm.so), even if you've included the math HEADER (math.h).  This practice is fairly common amonst compiler vendors, so GCC is not doing something wonky or strange.

You have to include the math LIBRARY by putting -lm (dash ell em) on your GCC link or compile+link line.

e.g.:
gcc -o myfoo foo.c -lm

HTH,
--Eljay



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux