undefined reference to `exp'

    技术2022-05-20  38

    明明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))

    搞定


    最新回复(0)