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.

first step is download and install NetBeans IDE.
now run NetBeans and create a new c/c++ Application project like the example 




go to project Properties -> C++ Compiler -> C++ Standard and make it C++11, and add -mwindows in additional options like the example


go to the Properties ->Linker ->Libraries and click add PkgConfig Library and choose gtkmm-3.0 like 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.
you can now start programming with gtkmm on windows.

2 comments:

  1. To make it work with Apache Netbeans 10, you need to install the C++ plugin. It's really easy. Netbeans was the best IDE for C++ I've found.

    ReplyDelete