linux&xenix下源程序编译问题求解,急!!!
请教:
一道求解AX*A+BX+C=0的简单程序,使用TC2。0编译正常。
但使用LINUX的gcc编译时报错:
/tmp/ccCXbCwm.o: In function 'main';
/tmp/ccCXbCwm.o(.text+0x10b):undefined reference to 'sqrt'
....
collect2:ld returned 1 exit status.
使用XENIX的cc时报错:
/bin/ld: error:Unresolved externals:
_sqrt in file(s):
4_6.o(4_6.c)
_fabs in file(s):
4_6.o(4_6.c)
程序中所用的函数业已使用了#include <math.h>,实不知错误原因
同改正方法,还请援手。