I am trying to run an gtkmm3 application but it doesn't work ! My code : #include #include
int main(void)
{
Glib::RefPtr<Gtk::Application> app = Gtk::Application::create("org.gtkmm.examples.base");
Gtk::Window window;
window.set_default_size(200, 200);
return (app->run(window));
}
And the error :
gtkmm:ERROR:application.cc:157:int Gtk::Application::run(Gtk::Window&): assertion failed: (m_argc) 1
20729 abort (core dumped) ./a.out
gdb told me the "app->run(window)" failed.
The doc says that there are two constructors, one with argc/argv and an other without.
If I use the first constructor, it works but i can't send an argument to my program because of gtk.
To compile, I use :
g++ test.cpp `pkg-config gtkmm-3.0 --cflags --libs`
What is the problem ?