Could someone please give me step by step instructions on how to make gtkmm work with Dev C++ on windows. I've tried following the instructions on the website, but I cant get it to work. Could you please tell me exactly what to download and where to install it.
Thanks.

Dani AI

Generated

This is the classic Windows/pkg-config mismatch rather than a Dev‑C++ bug. was on the right track about paths; add the following practical checks and fixes that usually get gtkmm working with a MinGW/Dev‑C++ setup.

First, confirm you actually have the gtkmm development files (headers and the .pc files). Look for the gtkmm *.pc file inside your GTK/gtkmm install — it’s normally under a lib\pkgconfig folder. If those .pc files are missing you likely installed only the runtime and must install the development bundle that matches your compiler (MinGW/Dev‑C++), not an MSVC build.

Next, make sure pkg-config can see that folder and that you’re running the pkg-config that belongs to your GTK/MinGW install. Set the pkgconfig folder in the environment and put the GTK/MinGW bin on your PATH. A quick temporary test from a Windows shell (CMD) looks like:

set PKG_CONFIG_PATH=C:\path\to\gtk\lib\pkgconfig
set PATH=C:\path\to\gtk\bin;%PATH%

After that, use the pkg-config tool that just ran to obtain the include and linker flags, and paste those flags into your Dev‑C++ Project Options (compiler include paths and linker libraries). That keeps Dev‑C++ in sync with GTK’s install layout.

Common pitfalls: pkg-config from a different toolchain (or none at all), .pc files for a different gtkmm version, or using gtkmm binaries built for MSVC instead of MinGW. If you can’t get pkg-config to find the .pc files, copying the pkgconfig directory into your MinGW installation is a last resort; better is to install a matching gtkmm dev package.

This approach expands on ’s path suggestion and avoids hardcoding include lists: find the .pc, point pkg-config at it, ensure the bin with pkg-config is on PATH, then import the flags into Dev‑C++. That sequence usually fixes the “not found” problem.

Recommended Answers

All 6 Replies

What doesn't work?

I installed Dev c++, GTK+ 2.x, the Gtk+/Win32 Development Environment, and gtkmm, but when I try to run pkg-config --cflags gtkmm-2.4 it says package gtkmm-2.4 was not found in the pkg-config search path. Perhaps you should add the directory containing 'gtkmm-2.4.pc' to the PKG_CONFIG_PATH enviroment variable
No package 'gtkmm-2.4' found

Try rebooting to update your path (I don't have access to a windows machine currently). If that doesn't work you could manually locate all of the necessary files.

Thanks Sturm, but rebooting didn't work, and I don't know which files I need so I can't find them myself.

Encase it helps I'm using windows XP and I installed everything with the default settings.

-Id:/dev-c++/include/gtkmm-2.4
	    -Id:/dev-c++/lib/gtkmm-2.4/include
	    -Id:/dev-c++/include/gtk-2.0
	    -Id:/dev-c++/lib/sigc++-2.0/include
	    -Id:/dev-c++/include/sigc++-2.0
	    -Id:/dev-c++/include/glib-2.0
	    -Id:/dev-c++/lib/glib-2.0/include
	    -Id:/dev-c++/lib/gtk-2.0/include
	    -Id:/dev-c++/include/pango-1.0 -Id:/dev-c++/include/atk-1.0
	    -Ld:/dev-c++/lib

Well presumably the necessary files would be in the above directories.

Thanks sturm, but I still can't get it to work. i think I'm going to try a different gui toolkit.

-Id:/dev-c++/include/gtkmm-2.4
	    -Id:/dev-c++/lib/gtkmm-2.4/include
	    -Id:/dev-c++/include/gtk-2.0
	    -Id:/dev-c++/lib/sigc++-2.0/include
	    -Id:/dev-c++/include/sigc++-2.0
	    -Id:/dev-c++/include/glib-2.0
	    -Id:/dev-c++/lib/glib-2.0/include
	    -Id:/dev-c++/lib/gtk-2.0/include
	    -Id:/dev-c++/include/pango-1.0 -Id:/dev-c++/include/atk-1.0
	    -Ld:/dev-c++/lib

Well presumably the necessary files would be in the above directories.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.