Closed brechtsanders closed 1 year ago
fixed, thanks I made like this
//#if defined (WIN32) || defined(_WIN32)
#if defined (_MSC_VER)
#define D_FLOAT_EXCEPTIONS_MASK (_EM_ZERODIVIDE | _EM_INVALID | _EM_DENORMAL)
#else
#define D_FLOAT_EXCEPTIONS_MASK (FE_DIVBYZERO | FE_INVALID | FE_INEXACT)
#endif
It is a shame the new c++ standards has not standardized exception handling, liek the did for atomics, thread, mutex, ect.
in any case, the exceptions are only valid in windows system, all othe OS ignored it. This is good for debugging and to get a clean code with hard to find float bugs, but Later I will add an option to the build system that disable them. production code should not required float exceptions.
Thanks for the report
That's exactly why I stay far away from MSVC: to avoid Microsoft's sometimes deviating standards. Your solution works for me, I just tried it and it builds with MinGW-w64. Thanks!
I was trying to build version 4.02 on Windows using MinGW-w64 and got errors that
EM_INVALID
is not defined.It looks like it is referenced in
sdk/dCore/ndUtils.h
:The problem is the
#if
line assumes Windows builds are always done with MSVC.Changing that line like this allows the build to continue:
But you may want to change it to checking something more MSVC specific.