This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]