SOLVED, this is not the common missing -lm problem! I'm in the same situation after upgrade to (k)ubuntu 11.10!
$ whereis math.h
math: /usr/include/math.h
Makefile:
CC=gcc
CFLAGS=--std=c99 -g -pedantic -Wall -lm
uname:
Linux idefix 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
You really HAVE TO place the -lm swith after -o foo foo.c parameter
Output:
pidi@idefix:~/projekt1$ make
gcc -o b1 b1.c --std=c99 -g -pedantic -Wall -lm
pidi@idefix:~/projekt1$
So swap your flags in Makefile! GUYS. This is pretty new (and serious) BUG!