Build-in sqrt()?




hello everyone,

why this c code can be compiled and linked without -lm?

#include<math.h>
#include<stdio.h>
int main()
{
printf("%f\n",sqrt(2.0));
return 0;
}

even NO sqrt symbol when i use nm to list symbols from the object file

someone can give me a hint? i'm using a gcc-4.1.2 with glibc2.4.1 under
linux

best regards

.



Relevant Pages

  • Re: Build-in sqrt()?
    ... int main ... even NO sqrt symbol when i use nm to list symbols from the object file ... *compile time*. ...
    (comp.lang.c)
  • stdout redirection problem
    ... I have some problems getting this simple C program to work on Linux: ... static void WriteAByte; ... int main ... Regards, ...
    (comp.unix.programmer)