You're using M_PI in parts of the code, unfortunately this constant isn't really defined in the standard and while available in most compilers, some compilers, like MSVC require additional steps to use it.
On top of that, since you use M_PI in a header file, the library user now also has to deal with it in their codebase.
You're using
M_PI
in parts of the code, unfortunately this constant isn't really defined in the standard and while available in most compilers, some compilers, like MSVC require additional steps to use it. On top of that, since you useM_PI
in a header file, the library user now also has to deal with it in their codebase.Steps to Reproduce
Build Candle with MSVC (2019)
Actual Behavior
Expected Behavior
Candle builds without errors
Solutions
add_definition(-D_USE_MATH_DEFINES)
to your CMake file in a scope for MSVC#define _USE_MATH_DEFINES
in front of every<cmath>
include