PDA

View Full Version : simple gtkmm question



SledgeHammer_999
March 23rd, 2008, 10:54 PM
I started using gtkmm. I came across some functions which take as parameters some enums. These enums point to his page of the documentation->link (http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/group__gtkmmEnums.html)

But my problem is that it doesn't tell which header I need to "#include" and I am unable to use any enum.

Do you know what should I do?

SledgeHammer_999
March 24th, 2008, 01:40 AM
The problem is somewhere else. Maybe I don't understand how to use enumerations. The compiler doesn't complain about the 'type of the enum' but for the value I am trying to assign to the enumeration.This means that it already 'knows' about the enumeration I am using. Here's an example:

Gtk::FileChooserAction d = FILE_CHOOSER_ACTION_OPEN;

Here's the error I get:

error: ‘FILE_CHOOSER_ACTION_OPEN’ was not declared in this scope

WW
March 24th, 2008, 03:42 AM
Try

Gtk::FileChooserAction d = Gtk::FILE_CHOOSER_ACTION_OPEN;

SledgeHammer_999
March 24th, 2008, 11:14 AM
Thank you. I can't believe that it was so simple.