3 Replies Latest reply on Sep 18, 2016 9:39 PM by newmoon002_1570756

    About function sin() problem

    newmoon002_1570756

      Hello,

         

      Why did PSOC creator say: "Build error: undefined reference to 'sin'" when I compile the code as below,

         

      and I try to set Inline functions true in build settings,but still display the same error.

         

       

         

      #include <math.h>

         

      int main(void)

         

         double x=0.5;

         

         double y;

         

         for(;;)

         

         {

         

            y = sin(x); //Build error: undefined reference to 'sin'

         

            y = sin(0.5); //this line is available passed

         

         }

         

      }