I have a function with the following code:
static void
calculate_lifetime(uint16_t p_weight){
double param, result;
param = (double) p_weight;
result = log (param);
}
I include the math library, but when I compile I get the error:
undefined reference to `log'
Am I doing something wrong when casting? When I remove param and put a number like 8 it compiles correctly.I'm compiling for Contiki.