Discussion:
Mingw compiler
(too old to reply)
Neville Dastur
2009-05-13 23:54:50 UTC
Permalink
I have recently got fed up with booting up a windows virtual box just to
compile the windows version of my app, so I checked out the MinGW
compiler on Linux. I have pretty much everything working except for
wxUSE_ON_FATAL_EXCEPTION.

I have always used this in my applications as I would like to log and
report unhanded errors, but it seems to be incompatible with MinGW. I
know wxUSE_ON_FATAL_EXCEPTION is set to zero if MinGW is the compiler,
but can't work out why. Is this something I need to ask the MinGW devs
about? Does it still apply to the latest MinGW releases. Should I drop
the use of wxUSE_ON_FATAL_EXCEPTION altogether?

Thanks in advance.
Neville Dastur
2009-05-14 00:06:55 UTC
Permalink
Partly answering my own question, is this article a possible solution?

http://www.programmingunlimited.net/siteexec/content.cgi?page=mingw-seh
Post by Neville Dastur
I have recently got fed up with booting up a windows virtual box just
to compile the windows version of my app, so I checked out the MinGW
compiler on Linux. I have pretty much everything working except for
wxUSE_ON_FATAL_EXCEPTION.
I have always used this in my applications as I would like to log and
report unhanded errors, but it seems to be incompatible with MinGW. I
know wxUSE_ON_FATAL_EXCEPTION is set to zero if MinGW is the compiler,
but can't work out why. Is this something I need to ask the MinGW devs
about? Does it still apply to the latest MinGW releases. Should I drop
the use of wxUSE_ON_FATAL_EXCEPTION altogether?
Thanks in advance.
_______________________________________________
wx-users mailing list
http://lists.wxwidgets.org/mailman/listinfo/wx-users
Vadim Zeitlin
2009-05-14 09:08:05 UTC
Permalink
On Thu, 14 May 2009 01:06:55 +0100 Neville Dastur <***@dastur.me.uk> wrote:

ND> Partly answering my own question, is this article a possible solution?
ND>
ND> http://www.programmingunlimited.net/siteexec/content.cgi?page=mingw-seh

This does look very promising. If anybody can

1. Contact the author of this code and ask him for a permission to include
it in wx under wxWindows licence
2. Actually integrate it into wx and make a patch (please see
http://trac.wxwidgets.org/wiki/HowToSubmitPatches) with the necessary
changes

it would definitely be very welcome.

But as it stands wx supports wxUSE_ON_FATAL_EXCEPTION under Win32 only
with compilers with built-in support for SEH which, unfortunately, means
that mingw32 is not supported.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Justino Zavala
2009-05-14 11:34:36 UTC
Permalink
We use a Windows function that allows doing a log before the OS closes
the application. I think you can't do anything more after
this function is called.
This is the code:

inside MyApp::OnInit we insert this line

SetUnhandledExceptionFilter(filter);


Before MyApp::OnInit we define the following function:

LONG __stdcall filter(EXCEPTION_POINTERS* p){

wxString text;
text.Printf("Unhandled Exception Code : %s",
p->ExceptionRecord->ExceptionCode);
Log(text);

exit(-1);
}

where Log is a custom function we use for logging.


regards,


Justino.
Post by Neville Dastur
I have recently got fed up with booting up a windows virtual box just
to compile the windows version of my app, so I checked out the MinGW
compiler on Linux. I have pretty much everything working except for
wxUSE_ON_FATAL_EXCEPTION.
I have always used this in my applications as I would like to log and
report unhanded errors, but it seems to be incompatible with MinGW. I
know wxUSE_ON_FATAL_EXCEPTION is set to zero if MinGW is the compiler,
but can't work out why. Is this something I need to ask the MinGW devs
about? Does it still apply to the latest MinGW releases. Should I drop
the use of wxUSE_ON_FATAL_EXCEPTION altogether?
Thanks in advance.
_______________________________________________
wx-users mailing list
http://lists.wxwidgets.org/mailman/listinfo/wx-users
Continue reading on narkive:
Loading...