Trying to get Gtk-Fortran to work in VS2019 with Intel Fortran Compiler

Putty is a SSH client, that you will use to connect to a distant machine. It does not emulate a Linux terminal on your machine.

When somebody talks about GTK, be conscious that GTK can mean the GTK library itself (with all the GUI widgets) but also the collection of libraries: GTK is just one of those libraries, but there is also GLib (on which is based GTK), Pango, Cairo, gdk-pixbuf… The error you shown is a linking error with the gdk-pixbuf library (which is used to draw pixels in an image).

When you compile a gtk-fortran program, you write something like:

$ gfortran my_app.f90 $(pkg-config --cflags --libs gtk-4-fortran)

But the pkg-config command expands like this:

`$ pkg-config --cflags --libs gtk-4-fortran

-rdynamic -mfpmath=sse -msse -msse2 -pthread -I/usr/local/include/gtk-4-fortran -I/usr/include/gtk-4.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/graphene-1.0 -I/usr/lib/x86_64-linux-gnu/graphene-1.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Xlinker -R/usr/local/lib -lgtk-4-fortran -lgtk-4 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lvulkan -lgraphene-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
`
Some may not be needed for gtk-fortran, but you will need GTK, GLib, gdk-pixbuf, Cairo, Pango, and a few others.

Sorry, I am not familiar with Visual Studio. And uses Windows only occasionally now… But you need to give Visual Studio access to all those needed libraries.

Note also that I remember that at the beginning of the gtk-fortran project, ten years ago, I had successfully compiled and run the examples using the gfortran Windows version and linking to the DLLs of the GTK libraries. And it was some dirty trick: I think I copied the DLL from the Gimp application (the original GTK was Gimp ToolKit) and put them in the same directory as the gtk-fortran examples. But it worked…