C Build error when getting the value of sin()

后端 未结 2 1175
一向
一向 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:50

    Be sure that your are linking with the math library.

    $ gcc myprog.c -lm
    
    0 讨论(0)
  • 2020-12-12 07:53

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

    Add this to the command line options:

    -lm
    
    0 讨论(0)
提交回复
热议问题