In regards to the answer provided by Fuzzy:
I actually had to do something slightly different.
Project -> Properties -> C/C++ Build -> Settings -> GCC C Linker -> Libraries
Click the little green add icon, type m and hit ok. Everything in this window automatically has -l applied to it since it is a library.