c math linker problems on Ubuntu 11.10 [duplicate]

The library that you are using needs to be placed after the files that use it when you are using it from the command line. So place -lm on after your C files on the command line.

Reference

Leave a Comment