明明已经include了math.h,还是提示没有sqrt和floor等各种数学函数,解决办法是显式制定要链接libm数学库:
gcc -o target target.c -lm
-lm一定要放最后,否则编译失败