*************************************************** * In CentoOs7 *************************************************** sudo yum install gtkmm24-devel.x86_64 sudo yum install gtkmm30-devel.x86_64 g++ -std=c++11 helloworld.cc main.cc `pkg-config gtkmm-3.0 --cflags --libs` /* ****************************************** */ /* This File : helloworld.h ***************** */ /* ****************************************** */ #ifndef GTKMM_EXAMPLE_HELLOWORLD_H #define GTKMM_EXAMPLE_HELLOWORLD_H #include #include class HelloWorld : public Gtk::Window { public: HelloWorld(); virtual ~HelloWorld(); protected: //Signal handlers: void on_button_clicked(); //Member widgets: Gtk::Button m_button; }; #endif // GTKMM_EXAMPLE_HELLOWORLD_H /* ****************************************** */ /* ****************************************** */ /* This File : helloworld.cc **************** */ /* ****************************************** */ #include "helloworld.h" #include HelloWorld::HelloWorld() : m_button("Hello World") // creates a new button with label "Hello World". { // Sets the border width of the window. set_border_width(10); // When the button receives the "clicked" signal, it will call the // on_button_clicked() method defined below. m_button.signal_clicked().connect(sigc::mem_fun(*this, &HelloWorld::on_button_clicked)); // This packs the button into the Window (a container). add(m_button); // The final step is to display this newly created widget... m_button.show(); } HelloWorld::~HelloWorld() { } void HelloWorld::on_button_clicked() { std::cout << "Hello World" << std::endl; } /* ****************************************** */ /* ****************************************** */ /* This File : main.cc ********************** */ /* ****************************************** */ #include "helloworld.h" #include int main (int argc, char *argv[]) { auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example"); HelloWorld helloworld; //Shows the window and returns when it is closed. return app->run(helloworld); } /* ****************************************** */ **************************************************** https://developer.gnome.org/gtkmm-tutorial/stable/sec-basics-simple-example.html.en **************************************************** sudo apt-get update sudo apt install at-spi2-core sudo apt-get install libgtkmm-2.4-dev sudo apt-get install libgtkmm-3.0-dev g++ helloworld.cc main.cc `pkg-config gtkmm-3.0 --cflags --libs` a.out **************************************************** **************************************************** * Start Here!!! https://www.gtkmm.org/en/documentation.html * ************************************************** https://developer.gnome.org/gtk3/stable/ch01s05.html GTK is the most stable graphics library It can be called from just about any language on any platform Focus on gtk programming in linux, probably want to install package gtkmm ??