Wednesday, June 1, 2016

how to install gtkmm on windows 7 / 8 / 10 in 3 steps

I think the difficult thing in gtkmm for most learners who using Windows, a lot of them have problems with installing gtkmm on Windows and for that reason much of them stop learn gtkmm, especially the beginners.
let's solve that and install gtkmm on windows in easy steps.

  • step 1 : download this file from here

extraxt this file in the C:/ like the example in the images bellow




  •  step 2 : adding the path

now let's add C:\msys32\mingw32\bin to PATH
Go to control panel > System > Advanced system settings > Environment variables and find "Path" under "System variables" select it and click edit button...
click new button  add C:\msys32\mingw32\bin like the example in the images


now to save this settings click buttons ok, ok, ok.  
  •  step 3 : create your home directory
go to C:\msys32 directory and execute the file mingw32.exe (like the example) you will see a cmd window
and home folder will be created with your name. 
now go to home directory you will find two folders one is yours and one is for test (Administrator) now inside "Administrator" folder there is an example of a compiled application in windows, just double click on it to check if every thing work.
 
Congratulation! you have successfully set up your gtkmm programing environment.
if you have any problem with that just comment, i will solve it with you.

6 comments:

  1. Hello. Which version of gtkmm are we installing with this file?
    Isn't there a way to make a crosscompilation from a linux machine to windows? (since it's easier to use gtkmm on linux)

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. I did every step that you said but still I get the fatal error.

    ||=== Build file: "no target" in "no project" (compiler: unknown) ===|
    C:\msys32\home\Administrator\GtkmmTutorial.cpp|1|fatal error: gtkmm.h: No such file or directory|
    ||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

    what is wrong?

    ReplyDelete
  4. fatal error: gtkmm.h: No such file or directory help ?

    ReplyDelete
  5. Open Windows 'regedit'
    and add:
    PATH ->> C:\msys32\mingw32\bin;
    CPATH ->> C:\msys32\mingw32\include;
    then restart and retry.

    ReplyDelete