Re: [glade--]unable to add new members to derived class



Bob Koutsky wrote:
Hello,
Hi Bob,

this is probably something very stupid, but my C++ is little rusty (after years of Java) and I'm completely new to gtkmm & related stuff, so please have a patience:

I create new gtk+ project using glade - single window containing a label, nothing else. I set the language to C++, generate code, run autogen.sh, run the program, it works. Then I add a single member to the main window class header file:

#ifndef _WINDOW1_HH
#  include "window1_glade.hh"
#  define _WINDOW1_HH
#include "glademm_support.hh"

class window1 : public window1_glade
{  public:
  int foo;
};
#endif

run make, run the program, and get segmentation fault. If I try to use DDD, it apparently fails on the "Gtk::Main m(&argc, &atgv)" line in function main, and it reports following:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 1120)]
0x4049a82e in Glib::ObjectBase::is_derived_ () from /usr/lib/libglibmm-2.0.so.1

My gcc is 2.95.3, glade-- is 1.1.2 and reports following when generating code:
Found pkg-config version 0.14.0
Generating code for gtk 2.0.8 (pkg-config), gtkmm 2.0.1 (pkg-config), [gnomemm 1.2.3 (pkg-config)]


Can somebody please tell what is the problem and how to fix it? I would like to convert to gtkmm, but I'm starting to miss Java and Swing already 8-)

You encountered one of the most mysterious bugs I've ever seen. Can you do:
  rm *.o
  make
and try it again. I can't think of anything causing this but it's a try.

If this still fails, try to send the package to me (or a full backtrace) (please delete *.o, any executables and the like).

Clearly a "should never occur" bug.

   Christof

PS: If you don't see a personal benefit from C++/gtk/gnome, don't switch. I never switched to java since I don't see any benefits for me (only drawbacks). But this clearly depends on your perspective.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]