Monday, June 20, 2016

how to configure netbeans IDE for gtkmm on windows 7 / 8 / 10

to start programming with gtkmm on windows you need to configure an IDE to compile and run your projects.
in this tutorial i will use NetBeans IDE you can download it from here.
before configuring your IDE you need to install gtkmm first if isn't installed in your computer you need to see this post how to install gtkmm on windows 7/8/10

This installation and cofiguration steps is work on all Windows machines (7, 8 a 10).

first think we need to do in windows before configure our IDE is to add C:\msys32\usr\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 and add ; before "C:\msys32\usr\bin"
click ok, ok, ok.

Thursday, June 16, 2016

how to configure netbeans IDE for gtkmm on linux

Before you start programming with Gtkmm you need to know that It's not practical to use terminal every time you add a line in your code  to compile and test your project, you need to choose an IDE that you prefer, and configuring your IDE to make your work easy it's just one click to compile and run your project.
in this tutorial i will use NeatBeans IDE you can download it from here.

This installation and cofiguration steps is work on all linux machines (ubuntu, fedora, centos...).

Gtkmm Simple Example

This is a simple gtkmm empty windows example, we will use this example to check the gtkmm installation and IDE configuration.

file name is GtkmmTutorial.cpp


 #include <gtkmm.h>

int main(int argc, char *argv[])
{
 
  Gtk::Main kit(argc, argv);
  Gtk::Window GtkmmTutorial;
  GtkmmTutorial.set_default_size(400, 400);
  Gtk::Main::run(GtkmmTutorial);

  return 0;
}

when you compile "GtkmmTutorial.cpp" file by the command below and get the output file "GtkmmTutorial". when you execute the this output file you will get you will see a 400x400 empty window like the example image 



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.