Re: gtkmm2.4 and MSVC (again)
- From: "Timothy M. Shead" <tshead k-3d com>
- Cc: gtkmm-list gnome org
- Subject: Re: gtkmm2.4 and MSVC (again)
- Date: Wed, 03 Nov 2004 12:01:21 -0800
Murray Cumming wrote:
This is strangely similar to a dynamic_cast<> problem that existed in g++
2.96:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/FAQ/html/index.html#id2543380
So it might be a compiler bug with use of dynamic_cast<> in the
constructor of with classes that use multiple inheritance. But to reach
that conclusion we would need a non-gtkmm test case.
This begins to look like the problem - enclosed is a simplification of
Matt's test case that should be clearer to look at, I am currently
fiddling-around to try and create a C++-only test case.
In the meantime, please make sure that any extra project file changes are
in our CVS, so that we are starting at the same point. I have access to
MSVC++ .Net 2003, so I might take a look if your own efforts don't reach a
conclusion.
Unless I've got the wrong branch, the MSVC files aren't in gtkmm CVS
yet, are they?
Cheers,
Tim
#include <gtkmm/main.h>
#include <gtkmm/window.h>
#include <iostream>
// As written, this program will generate a "no RTTI data!" at runtime when
// compiled with Visual Studio .NET 2003
//
// There are two ways to eliminate the exception, either:
//
// * Comment-out the member variable derived::x, or
// * Comment-out the call to show() in base::base(), and un-comment the call to show in derived::derived()
class base :
public Gtk::Window
{
public:
base() :
Gtk::Window(Gtk::WINDOW_TOPLEVEL)
{
try
{
show();
}
catch(bad_typeid x)
{
std::cout << "Exception " << x.what() << std::endl;
}
}
};
class derived :
public base
{
public:
derived() :
base()
{
// show();
}
protected:
int x;
};
int main(int argc, char **argv)
{
Gtk::Main m(&argc, &argv);
derived w;
m.run();
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]