New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M_PI is non-standard #3
Comments
MiguelMJ
referenced
this issue
Apr 14, 2021
Thanks for pointing it out! I appreciate it so much. |
@all-contributors please add @eXpl0it3r for bug |
I've put up a pull request to add @eXpl0it3r! 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.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>
includeThe text was updated successfully, but these errors were encountered: