You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My team had a problem today. We #include <soloud.h>, which in turn includes <windows.h>. This causes std::min() to not compile elsewhere in the codebase, because windows.h defines a custom min() macro. This can be fixed by #define NOMINMAX right before the include of windows.h.
Currently we fix this by defining NOMINMAX before including soloud, but this was a source of much stress for us until we figured this out. I think it might be good for Soloud to make this define automatically on line 42 of soloud.h, right before including windows.h, to prevent this from being a problem in the first place. We tested that the define placed there does indeed fix the issue.
The text was updated successfully, but these errors were encountered:
IMHO windows.h should not be included by soloud.h.
Just had a look at it and a forward declare of OutputDebugStringA() should be enough to replace the #include.
My team had a problem today. We
#include <soloud.h>
, which in turn includes<windows.h>
. This causesstd::min()
to not compile elsewhere in the codebase, becausewindows.h
defines a custommin()
macro. This can be fixed by#define NOMINMAX
right before the include ofwindows.h
.Currently we fix this by defining
NOMINMAX
before including soloud, but this was a source of much stress for us until we figured this out. I think it might be good for Soloud to make this define automatically on line 42 ofsoloud.h
, right before includingwindows.h
, to prevent this from being a problem in the first place. We tested that the define placed there does indeed fix the issue.The text was updated successfully, but these errors were encountered: