Q:

gtkmm-3.0 : Program Build Failed Msys2 Netbeans using pkg-config

Net-beans : 8.2
Windows : 10 64-bit
MinGW-w64 g++ : 7.2
I am trying to create an empty window using gtkmm 3.0 referring Programming with gtkmm book. I am referring (3.1) Simple Example from Chapter 3. Basics
#include <gtkmm.h>

int main(int argc, char *argv[])
{
  auto app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base");

  Gtk::Window window;
  window.set_default_size(200, 200);

  return app->run(window);
}

I have tried both 
#include <gtkmm-3.0/gtkmm.h>
#include <gtkmm.h>

but my build fails under both circumstances.
g++    -c -g `pkg-config --cflags gtkmm-3.0` -std=c++14  -MMD -MP -MF "build/Debug/MinGW-Windows/main.o.d" -o build/Debug/MinGW-Windows/main.o main.cpp
Package gtkmm-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtkmm-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtkmm-3.0' found
main.cpp:14:10: fatal error: gtkmm.h: No such file or directory
 #include <gtkmm.h>
          ^~~~~~~~~
compilation terminated.
make[2]: *** [nbproject/Makefile-Debug.mk:68: build/Debug/MinGW-Windows/main.o] Error 1
make[2]: Leaving directory '/e/Projects/DiaplayL'
make[1]: *** [nbproject/Makefile-Debug.mk:59: .build-conf] Error 2
make[1]: Leaving directory '/e/Projects/DiaplayL'
make: *** [nbproject/Makefile-impl.mk:40: .build-impl] Error 2

BUILD FAILED (exit value 2, total time: 1s)

I have installed msys2 in E drive. I was unable to install msys2 in C drive as the installation gets stuck at 0%. 
I have added PKG_CONFIG_PATH :- E:\msys64\mingw64\bin in my environment variables. I am able look at include directories using --cflags and linked libraries using --libs
E:\Projects\DemoLcd>pkg-config --cflags gtkmm-3.0
-mms-bitfields -pthread -mms-bitfields -IE:/msys64/mingw64/include/gtkmm-3.0 -IE:/msys64/mingw64/lib/gtkmm-3.0/include -IE:/msys64/mingw64/include/atkmm-1.6 -IE:/msys64/mingw64/include/gdkmm-3.0 -IE:/msys64/mingw64/lib/gdkmm-3.0/include -IE:/msys64/mingw64/include/giomm-2.4 -IE:/msys64/mingw64/lib/giomm-2.4/include -IE:/msys64/mingw64/include/pangomm-1.4 -IE:/msys64/mingw64/lib/pangomm-1.4/include -IE:/msys64/mingw64/include/glibmm-2.4 -IE:/msys64/mingw64/lib/glibmm-2.4/include -IE:/msys64/mingw64/include/gtk-3.0 -IE:/msys64/mingw64/include/cairo -IE:/msys64/mingw64/include -IE:/msys64/mingw64/include/pango-1.0 -IE:/msys64/mingw64/include/atk-1.0 -IE:/msys64/mingw64/include/cairo -IE:/msys64/mingw64/include/cairomm-1.0 -IE:/msys64/mingw64/lib/cairomm-1.0/include -IE:/msys64/mingw64/include/cairo -IE:/msys64/mingw64/include/pixman-1 -IE:/msys64/mingw64/include -IE:/msys64/mingw64/include/freetype2 -IE:/msys64/mingw64/include/libpng16 -IE:/msys64/mingw64/include/harfbuzz -IE:/msys64/mingw64/include/glib-2.0 -IE:/msys64/mingw64/lib/glib-2.0/include -IE:/msys64/mingw64/include -IE:/msys64/mingw64/include/freetype2 -IE:/msys64/mingw64/include -IE:/msys64/mingw64/include/harfbuzz -IE:/msys64/mingw64/include/libpng16 -IE:/msys64/mingw64/include/sigc++-2.0 -IE:/msys64/mingw64/lib/sigc++-2.0/include -IE:/msys64/mingw64/include/gdk-pixbuf-2.0 -IE:/msys64/mingw64/include/libpng16 -IE:/msys64/mingw64/include -IE:/msys64/mingw64/include/glib-2.0 -IE:/msys64/mingw64/lib/glib-2.0/include -IE:/msys64/mingw64/include

E:\Projects\DemoLcd>pkg-config --libs gtkmm-3.0
-LE:/msys64/mingw64/lib -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lglibmm-2.4 -lgtk-3 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi -lsetupapi -lcfgmgr32 -lz -lpangowin32-1.0 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lgio-2.0 -lcairomm-1.0 -lcairo -lsigc-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl

I am facing the same problem in other machine where msys2 is installed in C drive and installed without a hitch.
Kindly advice.

A:

Solution is in 2 steps :

Modify $PKG_CONFIG_PATH in Msys2 shell to include the pkg_config folder containing .pc files for respective packages. eg: export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/mingw64/lib/pkgconfig or add the above command in /home//.bashrc
Create PKG_CONFIG_PATH environment variable with value as the Linux-type path i.e. /mingw64/lib/pkgconfig of the pkg_config folder containing .pc files for respective packages. e.g.: PKG_CONFIG_PATH = /mingw64/lib/pkgconfig

