M_PI flagged as undeclared identifier

前端 未结 5 1726
走了就别回头了
走了就别回头了 2020-12-24 05:36

When I compile the code below, I got these error messages:

(Error  1   error C2065: \'M_PI\' : undeclared identifier 
2   IntelliSense: identifier \"M_PI\"          


        
5条回答
  •  悲哀的现实
    2020-12-24 06:42

    I used C99 in NetBeans with remote linux host with its build tools.
    Try adding #define _GNU_SOURCE and add the -lm during linking.

提交回复
热议问题