Couple days ago it was working fine, but trying to use again today, my code editor cannot find sincos anymore and GCC throws me a warning that it cannot find sincos when compiling.
Here's the code:
// file: main.c #include <math.h> int main() { double sin, cos; sincos(0.0, &sin, &cos); return 0; }
Using gcc:
$ gcc main.c -lm x.c: In function ‘main’:x.c:5:2: warning: implicit declaration of function ‘sincos’ [-Wimplicit-function-declaration] 5 | sincos(0.0, &sin, &cos); | ^~~~~~x.c:5:2: warning: incompatible implicit declaration of built-in function ‘sincos’x.c:2:1: note: include ‘<math.h>’ or provide a declaration of ‘sincos’ 1 | #include <math.h>+++ |+#include <math.h> 2 |
It says I should include math.h yet I do.It says it can't find sincos yet it compiles and runs fine. I'm just annoyed by those warnings. Anyone knows what's wrong?