Thursday, June 16, 2016

Gtkmm Simple Example

This is a simple gtkmm empty windows example, we will use this example to check the gtkmm installation and IDE configuration.

file name is GtkmmTutorial.cpp


 #include <gtkmm.h>

int main(int argc, char *argv[])
{
 
  Gtk::Main kit(argc, argv);
  Gtk::Window GtkmmTutorial;
  GtkmmTutorial.set_default_size(400, 400);
  Gtk::Main::run(GtkmmTutorial);

  return 0;
}

when you compile "GtkmmTutorial.cpp" file by the command below and get the output file "GtkmmTutorial". when you execute the this output file you will get you will see a 400x400 empty window like the example image 



No comments:

Post a Comment