Configuration of Gtkmm in dev-cpp

Source: Internet
Author: User
Tags gtk

Install Gtkmm

1. First install dev-cpp

2. then install the latest gtkmm2.4 from http://www.pcpm.ucl.ac.be /~ Gustin/win32_ports/index.html

The development environment without gtk2.4 is automatically detected during the installation process, and the installation program is automatically downloaded. Note: Install both environments in the main directory of dev-cpp, for example, d:/dev-cpp.

3. Execute pkg-config -- libs -- cflags gtkmm-2.4> pkg-config.txt on the command line to generate some path parameters required for compilation and connection, as shown below:

Put the following content in the compiler option: "Add the following command during compilation"

-Mms-bitfields-ID:/Dev-Cpp/include/gtkmm-2.4-ID:/Dev-Cpp/lib/gtkmm-2.4/include-ID: /Dev-Cpp/include/glibmm-2.4-ID:/Dev-Cpp/lib/glibmm-2.4/include-ID:/Dev-Cpp/include/gdkmm-2.4-ID: /Dev-Cpp/lib/gdkmm-2.4/include-ID:/Dev-Cpp/include/pangomm-1.4-ID:/Dev-Cpp/include/atkmm-1.6-ID: /Dev-Cpp/include/gtk-2.0-ID:/Dev-Cpp/include/sigc ++-2.0-ID: /Dev-Cpp/lib/sigc ++-2.0/include-ID:/Dev-Cpp/include/glib-2.0-ID: /Dev-Cpp/lib/glib-2.0/include-ID:/Dev-Cpp/lib/gtk-2.0/include-ID:/Dev-Cpp/include/pango-1.0-ID: /Dev-Cpp/include/cairo-ID:/Dev-Cpp/include/atk-1.0

Put the following command in "connector command line Add the following command"

-LD: /Dev-Cpp/lib-lgtkmm-2.4-lgdkmm-2.4-latkmm-1.6-lgtk-win32-2.0-lpangomm-1.4-lglibmm-2.4-lsigc-2.0-lgdk-win32-2.0-latk-1.0-lgdk_pixbuf-2.0-lpangowin32-1.0-lgdi32-lpangocairo-1.0-lpango-1.0-lcairo-lgobject-2.0-lgmodule-2.0 -lglib-2.0-line-liconv

4. After the environment is configured, write a simple program for testing:

# Include <gtkmm. h>

 

Int main (int argc, char * argv [])

{

Gtk: Main kit (argc, argv );

Gtk: Window window;

Gtk: Main: run (window );

Return 0;

}

Is there a simple window. Congratulations, GTKMM is successfully installed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.