When I compile the code below, I got these error messages:
(Error 1 error C2065: \'M_PI\' : undeclared identifier 2 IntelliSense: identifier \"M_PI\"
I used C99 in NetBeans with remote linux host with its build tools. Try adding #define _GNU_SOURCE and add the -lm during linking.
#define _GNU_SOURCE
-lm