If I include
or
in a C program I don\'t have to link these when compiling but I do have to link to
If I put stdlib.h or stdio.h, I don't have to link those but I have to link when I compile:
stdlib.h
, stdio.h
are the header files. You include them for your convenience. They only forecast what symbols will become available if you link in the proper library. The implementations are in the library files, that's where the functions really live.
Including math.h
is only the first step to gaining access to all the math functions.
Also, you don't have to link against libm
if you don't use it's functions, even if you do a #include
which is only an informational step for you, for the compiler about the symbols.
stdlib.h
, stdio.h
refer to functions available in libc
, which happens to be always linked in so that the user doesn't have to do it himself.