Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why does my application seem to segfault inside a dynamic_cast<> in gtkmm?

application gtkmm segfault
0
10 Posted

Why does my application seem to segfault inside a dynamic_cast<> in gtkmm?

0

gcc 2.96 and earlier have a bug which prevents use of dynamic_cast<> during a constructor. This is only a problem when you derive a new class from a gtkmm class and specify a specific base class constructor. You can avoid this by using a different constructor. For instance, instead of using the Gtk::Button(“sometext”) constructor, you could use the default constructor and then call Gtk::Button::set_label(). See this bug report for more information. This bug does not apply to all non-default constructors – if you are using an old compiler then you should just try it and see.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123