如果我包含<stdlib.h>或<stdio.h>在C程序中,我不必在编译时链接这些,但我必须链接到<math.h>,使用-lmgcc,例如:
<stdlib.h>
<stdio.h>
<math.h>
-lm
gcc test.c -o test -lm
这是什么原因?为什么我必须显式链接数学库而不是其他库?
c compilation math.h
c ×1
compilation ×1
math.h ×1