美文网首页
gcc对sqrt未定义的使用的解决

gcc对sqrt未定义的使用的解决

作者: hello_mr_future | 来源:发表于2017-12-02 20:32 被阅读0次

错误信息,如下:

/tmp/cczxLtbW.o:在函数‘main’中:
srand.c:(.text+0x5d):对‘sqrt’未定义的引用
collect2: error: ld returned 1 exit status

解决办法: gcc a.c -o a -lm.

相关文章

网友评论

      本文标题:gcc对sqrt未定义的使用的解决

      本文链接:https://www.haomeiwen.com/subject/kmhobxtx.html