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...).

let's do a quick view on netbeans installation : 
when you go to the link above you will see like the image below, download the netbeans for C/C++


after download Netbeans start installation from command line, cd to Downloads directory and execute the sh file and complete the installation like the example below
cd Downloads 
sh netbeans-8.1-cpp-linux-x86.sh



now when Netbeans was installed run it to start configuring


now create a new project (c/c++ Application)   like the example  



now go to project Properties -> C++ Compiler -> C++ Standard and make it C++11


now go to the Properties ->Linker ->Libraries and click add PkgConfig Library and choose gtkmm-3.0 like the example and click ok, ok, ok.


now change the C++ code inside main.cc to gtkmm simple windows code and click run project like the example below. 


if you see a window example like the image, Congratulation! Netbeans IDE was configured successfully.

3 comments: