problem with Glib:OptionContext

Hello, I'm trying to retrieve command line parameters using:  Main
(int& argc, char**& argv, Glib::OptionContext
option_context) contructor.

Glib::OptionContext context;
Gtk::Main m (&argc, &argv,&context);

But i get a message saying that OptionContext is not a member of Glib.
I'm using glibmm 2.4.7 and gtkmm 2.4.1.

By the way, what is the best (cleanest) way to get command line
parameters in the main window Object?  I'm using get_widget_derived, so
I can't override the Window's constructor to pass OptionContext.  I
actually use a  myWin->setOptionContext(...) method to do the job before
calling Gtk::Main::run but I 'd like to know if there is a better solution.

Thanks for help.


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