C Build error when getting the value of sin()

后端 未结 2 1201
一向
一向 2020-12-12 07:26

I have recently started learning C as a side project. I am working under OpenSuse with the latest NetBeans using the GCC as toolset for compiling. One of the very first prog

2条回答
  •  轮回少年
    2020-12-12 07:53

    In C, you need to link to the math library:

    Add this to the command line options:

    -lm
    

提交回复
热议问题