I noticed that when I use sin inside  function the compiler don't recognize it, here is an example:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
float sinus(float a){
    return sin(a);}
int main(int argc, char **argv)
{
    double a = sinus(2);
    printf("%f \n", sin(2));
    printf("%f", a);
    return 0;
}
If I use it directly in main it works fine, but inside a user defined function it gives me this error undefined reference to sin.
For compiling I use gcc -Wall -lm -lc -lgcc  -o "%e" "%f".