我使用Geany进行C编程。当我尝试生成文件时,它给了我
error:undefined reference to sqrt.
编译: gcc -Wall -c "%f"
建造: gcc -Wall -o "%e" "%f"
执行: ./%e
我试图添加-lm
到构建命令,但随后它给了我
gcc error:no such file or directory.Compilation Failed.
带参数的编译器和链接器选项必须分开,无法像您一样进行编译。
将它们分开,例如
gcc -Wall -o "%e" "%f" -lm
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句