Re: Exception handling and Windows
- From: Yoann Le Montagner <yo35 melix net>
- To: gtkmm-list gnome org
- Subject: Re: Exception handling and Windows
- Date: Fri, 05 Aug 2011 12:18:50 +0200
Hi,
I've managed to get around my problem by building the gtkmm libraries by
myself, with the latest version of the MinGW compiler.
Yoann
Le 04/08/2011 14:37, Yoann Le Montagner a écrit :
Hi,
Thanks for your help. I was using MinGW, version 4.5.2 (the one
provided on http://www.mingw.org/ ). I changed for the version you
suggested
(http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/sezero_20101003/),
which labeled 4.4.5. With this version of the compiler, the behavior
of the testcase program is different, but is still wrong ! When
clicking on the button, I get :
- with mingw 4.5.2:
>terminate called after throwing an instance of 'std::exception'
> what(): std::exception
and then the program terminates
- with mingw 4.4.5:
>Call to my_exception_handler
>terminate called without an active exception
and then the program terminates
The latest case behave as if the exception were first caught before
calling to 'my_exception_handler': if I comment the try-catch block in
this function, I get :
>Call to my_exception_handler
and then the program continues.
Any idea?
Yoann
Le 04/08/2011 13:17, Armin Burgmeier a écrit :
Hi Yoann,
are you using MinGW or MSVC? If the former, then you should make sure to
use the same compiler as the one the official binaries were built with,
see http://live.gnome.org/action/info/gtkmm/MSWindows/
Cheers,
Armin
On Thu, 2011-08-04 at 11:50 +0200, Yoann Le Montagner wrote:
Hi,
I have a problem with exception handling on Windows. In my application,
I set up a global exception handler with the function
Glib::add_exception_handler, so that this handler is supposed to be
called when an exception is thrown during the execution of the main
loop. It works fine when the program is built under Linux, but the
exception handler set up by Glib::add_exception_handler is never called
when the program is built under Windows.
I enclose a simple testcase. When clicking on the button:
- under Linux, the exception is normally catched in
my_exception_handler,
- under Windows, the program terminates.
What's wrong? Thanks for your help.
Yoann
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]