garrynewman / GWEN

Abandoned: GWEN - GUI Without Extravagant Nonsense.
MIT License
427 stars 102 forks source link

MinGW not properly checked for in macros. #102

Open MakoEnergy opened 7 years ago

MakoEnergy commented 7 years ago

I am here due to some difficulties trying to get Bullet3 up and running on MinGW. In Macros.h windows is checked for using "_WIN32" and then uses non-portable versions of functions (vsnprintf_s, for example) available only in MSVC. This is a problem since MSVC isn't the only compiler available on Windows.

The #ifdef _WIN32 should be replaced with #ifdef _MSC_VER if the intent is to use MSVC specific features.

The #elif defined(__linux__) should also probably be replaced with #elif defined(__linux__) || defined(__GNUC__).

In the case of MinGW, the __GNUC__ would be detected and used.