Primary development system is MacOS with clang. When using cos and sin they work as expected and there are no warnings or errors. On Windows with gcc, there are compile errors for missing symbols. At the time of this writing, there are no known ways to catch this error, other than building on Windows. There should be some kind of solution to catch the errors before Windows.
Some ideas:
Install gcc on Mac and build there
Provide a seamless CI that will always build on Windows and report the error.
See if there is a way to parse the code manually and detect cos or sin symbols in the codebase, and then check to be sure the appropriate header <cmath> is included.
Primary development system is MacOS with clang. When using
cos
andsin
they work as expected and there are no warnings or errors. On Windows with gcc, there are compile errors for missing symbols. At the time of this writing, there are no known ways to catch this error, other than building on Windows. There should be some kind of solution to catch the errors before Windows.Some ideas:
gcc
on Mac and build therecos
orsin
symbols in the codebase, and then check to be sure the appropriate header<cmath>
is included.Related discussion on SO: https://stackoverflow.com/questions/20903307/c-cosine-works-without-the-std-namespace-why