undefined reference to acosf

Today I was refreshing my little c knowledge, and I failed to compile simple app with
undefined reference to `acosf`
I got math.h included. compiling with -std=c99. Why is it failing? I checked math.h source it has

Code:
/* float versions of ANSI/POSIX functions */
#if __ISO_C_VISIBLE >= 1999
float	acosf(float);
...

So why isn't acosf defined? (How to solve this correctly?)


EDIT:
fount it... heck I was missig -lm linker switch
 
Back
Top