gint buffersize; Glib::OptionEntry phimage::entry(char short_name, const char* long_name, const char* description) { Glib::OptionEntry ent1; ent1.set_short_name(short_name); ent1.set_long_name(long_name); ent1.set_description(description); return ent1; } void phimage::init_options(int argc, char **argv) { Glib::OptionContext test; Glib::OptionGroup idiot("example", "example", "example"); idiot.add_entry(this->entry('b',"buffersize","no"), buffersize); test.set_main_group(idiot); test.parse(argc, argv); cout << "test"; }