garrynewman / GWEN

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

MinGW-w64 compile issue #61

Closed Wizzard033 closed 11 years ago

Wizzard033 commented 11 years ago

There is a code issue when compiling with the TDM-GCC variant of MinGW-w64. It's outlined pretty well by the following:

Current code:
#ifdef _WIN32
            MessageBoxA( NULL, strMsg, "Assert", MB_ICONEXCLAMATION | MB_OK );
            _asm { int 3 };
#endif
Proposed change:
#ifdef _WIN32
            MessageBoxA( NULL, strMsg, "Assert", MB_ICONEXCLAMATION | MB_OK );
#ifdef _MSC_VER
            _asm { int 3 };
#else
            asm("int $3");
#endif
#endif
qehgt commented 11 years ago

Hm... There is DebugBreak() WinAPI function specially for this purpose. No asm needed at all.