This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
-lm not required when including functions from math.h
- From: Harvey Muller <hlmuller at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 27 Jun 2008 10:04:01 -0700 (PDT)
- Subject: -lm not required when including functions from math.h
I'm learning C programming using the GNU toolchain (gcc, as, ld, glibc) using a popular linux distribution.? What I expect from what I have read so far, is that if I use a function from the math library without specifying the library on the gcc, command line, is that I should get an "undefined reference" error message.
I am not getting the expected error message, the simple application compiles and executes correctly.? Can anyone explain why I am not getting the expected error message?
Best regards,
Harvey