Using C++ Data Types in Custom Gtk+ Classes

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

 



As anyone can see from the title, I am trying to use a C++ data
type such as a string or vector as a member in a custom Gtk+
class. Here is a little example of what I mean:

struct Custom
{
GtkNotebook parent;
vector<string> list;
};

struct CustomClass
{
GtkNotebookClass parent_class;
};

When I do this, I keep getting segmentation faults from the debugger.
The output of gdb keeps telling me I cannot do anything with those
variables. For example, if I include a string, when I try to set it equal to
some text, it tells me it crashed in the "assign()" function.

I have had problems integrating C++ and Gtk+ before, but I do not want
to use Gtkmm. I used it before and it added too much extra baggage on
the executable.

Thanks for any help you can offer! - Andrew Krause
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux