Command line tools
| Appendix E. gtkmm and Win32 |

## Command line tools

To build your gtkmm application with command line tools, we recommend you either use mingw combined with cygwin (http://www.cygwin.com) or msys (http://www.mingw.org). If you use mingw/cygwin, make sure that the directory that contains the mingw executables is first in your PATH (by checking with g++ -v). Then

1. Add the directories with the gtkmm and gtk+ DLLs and the gtk+ executables (particularly the one containing pkg-config.exe) to your path. If you have selected the corresponding option in the gtkmm installer, both the gtkmm and gtk+ runtime will already be in your PATH. Make sure pkg-config is available by typing 'pkg-config --version'.

2. Set the PKG_CONFIG_PATH environment variable to point to the various lib/pkgconfig directories. Look for files with the .pc extension in the gtk+ and gtkmm developer packages. It's the same syntax as on linux but the directories are separated by semicolons.

3. Check the gtkmm distribution by typing 'pkg-config --modversion --cflags --libs gtkmm-2.4'. You should get something like

       		2.2.1
       		-IC:/target/libsigc/lib/sigc++-2.0/include
       		-IC:/target/libsigc/include/sigc++-2.0
       		-IC:/target/gtkmm/include/gtkmm-2.4
       		-IC:/target/gtkmm/lib/gtkmm-2.4/include
       		-IC:/target/gtk-2.0/include/gtk-2.0
       		-IC:/target/gtk-2.0/include/glib-2.0
       		-IC:/target/gtk-2.0/lib/glib-2.0/include
       		-IC:/target/gtk-2.0/lib/gtk-2.0/include
       		-IC:/target/gtk-2.0/include/pango-1.0
       		-IC:/target/gtk-2.0/include/atk-1.0
       		-LC:/target/libsigc/lib
       		-LC:/target/gtkmm/lib
       		-LC:/target/gtk-2.0/lib -lgtkmm-2.4
       		-lgdkmm-2.4 -latkmm-1.4 -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 -lpango-1.0
       		-lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl
       		-liconv

   Of course, the target directories will show your local installation tree.

4. You can compile a single source file like so:

   g++ `pkg-config --cflags gtkmm-2.4` my_programs.cc -o my_program `pkg-config --libs gtkmm-2.4`

See the gtkmm FAQ for more build help.

Appendix E. gtkmm and Win32 |  | Building gtkmm on Win32