Hi, I have built the library with CMake and Visual Studio but obtained the following error:
'M_PI_2' undeclared identifier.
After some digging around, I have found the reason which is specific to Visual Studio. The math constants are not defined by default in it, see this post.
There are two possible workaroun:
1: #define _USE_MATH_DEFINES before including cmath (not sure where it is included in this library)
or
2: in geometry.h, there is a preprocessor command to define M_PI if it is not yet defined, so a similar preprocessor command can be added:
#ifndef M_PI_2#define M_PI_2 1.57079632679489661923 #endif
Hi, I have built the library with CMake and Visual Studio but obtained the following error:
'M_PI_2' undeclared identifier.
After some digging around, I have found the reason which is specific to Visual Studio. The math constants are not defined by default in it, see this post.
There are two possible workaroun: 1:
#define _USE_MATH_DEFINES
before including cmath (not sure where it is included in this library) or 2: in geometry.h, there is a preprocessor command to define M_PI if it is not yet defined, so a similar preprocessor command can be added:#ifndef M_PI_2
#define M_PI_2 1.57079632679489661923
#endif
Hope it can be helpful.