I'm having problems compiling a c++ project that include cmath with Visual Studio 2012 and I get this error
error C2065: 'M_PI' : undeclared identifier
I've tried this M_PI works with math.h but not with cmath in Visual Studio but it doesn't work at all
How can I solve this issue?
EDIT
the application source code I downloaded a couple of weeks ago was not stable. So today I tried to download the updated sources and now it works like a charm
#define _USE_MATH_DEFINESand#include <cmath>as high as possible in your include chain, but that did not change anything?M_PIis not part of the C++ (or the C) standard. They are part of the POSIX standard though. Other systems may have it as an extension.