8 Replies Latest reply on Jul 11, 2012 6:31 AM by mayur.karathia

    Math.h functions...why is the compiler/linker drawing a blank?

    loren.snyder

      Hi all. I'm trying to use a sin() function. I've #included both math.h and stdlib.h, but my code won't build:

         

      "main.c:37: undefined reference to `sin' "

         

      I say won't build, because if I issue a complie command on the main.c code alone, it works just fine. What gives?

         

       

         

      P.S. Yes, I know the argument and resultant are both doubles, that's not the problem.