Issue with simple Makefile: undefined reference to symbol 'cos@@GLIBC_2.2.5'

后端 未结 2 610
南旧
南旧 2021-02-18 13:44

I\'m trying to compìle some test C code using a Makefile. The main.c file includes two headers:

#include \"circle_buffer.h\"
#include \"window.h\"
<         


        
2条回答
  •  醉酒成梦
    2021-02-18 14:32

    Sounds like the math library, libm needs to be linked in. Add -lm to the linking stage.

     LIBS=-L/usr/lib/x86_64-linux-gnu -lsndfile -lm
    

提交回复
热议问题