undefined reference to `exp'

来源:互联网 发布:变声软件破解版 编辑:程序博客网 时间:2024/05/22 19:56

明明include math.h了,而且也用了一个小例子试验了下exp函数是可以用的.

但是一个大的程序就总是编译不过  undefined reference to `exp'

后来google了下, gcc -o main main.c -lm   ((-lm tells the linker to link with /usr/lib/libm.so))

搞定