eat_a_lemon eat_a_lemon - 1 year ago 98
C Question

Eclipse C/C++ (CDT) add -l option (linking math module) gcc -lm

I am trying to have eclipse on linux (Ubuntu) link the math module.
Normally I would link with gcc -lm. How do I get eclipse to add this?
Is it in library paths under Project->Properties? Where does the math module reside on a linux Ubuntu system?

Answer Source

Somewhere along this path: Project->Properties->C/C++ Build->Settings, then under the Tools tab: GCC Linker->Libraries

As for where it is in the system, usually /usr/lib/

FYI, this is all true of my system, but may differ slightly on yours for any number of reasons. Shouldn't be hard to adjust if needed.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download