This feels silly, but its been 2 days...somewhere after upgrading from Ubuntu 10.04 to 10.11 and from Eclipse Helios to Eclipse Indigo, I got stuck with the following problem:>
You are missing -lm option in your build preferences. Project->Properties->Settings->Miscleanous->Other (linker) flags[]