What does -lm option do in g++?
g++, gcc
Solution
That's a linker option. It tells the linker to link with (`-l`) the `m` library (libm.so/dll). That's the math library. You often need it if you `#include <math.h>`.
Problem
What does `-lm` option do in g++ and when is it needed? Is there a complete description of g++ options?