diff --git a/harbour/source/vm/mainwin.c b/harbour/source/vm/mainwin.c index b0f12c0a73..2f00a51c44 100644 --- a/harbour/source/vm/mainwin.c +++ b/harbour/source/vm/mainwin.c @@ -57,6 +57,12 @@ #if defined(HB_OS_WIN_32) +#if defined(_MSC_VER) +extern "C" { + LONG WINAPI hb_UnhandledExceptionFilter( struct _EXCEPTION_POINTERS * ExceptionInfo ); +}; +#endif + #define MAX_ARGS 128 static int s_argc = 0; @@ -73,7 +79,9 @@ int WINAPI WinMain( HINSTANCE hInstance, /* handle to current instance */ #ifdef HB_INCLUDE_WINEXCHANDLER { - LONG WINAPI hb_UnhandledExceptionFilter( struct _EXCEPTION_POINTERS * ExceptionInfo ); + #if ! defined(_MSC_VER) + LONG WINAPI hb_UnhandledExceptionFilter( struct _EXCEPTION_POINTERS * ExceptionInfo ); + #endif LPTOP_LEVEL_EXCEPTION_FILTER ef = SetUnhandledExceptionFilter( hb_UnhandledExceptionFilter ); HB_SYMBOL_UNUSED( ef ); }