GTK-Fortran GTK3 for visual studio community 2022 error in opening the compiled module file

I have previously had a project working with gtk3 in vs community 2019, but since vs community 2019 seems no longer available for download, i have to migrate all scripts to 2022. However, I have encounter a problem in running the GTK-fortran.

I have followed the guide Fortran GUI with gtk-fortran (installation) but gvsbuild installed with the recommended way on GitHub - wingtk/gvsbuild: GTK stack for Windows. I have added the environment variables to the release folder of gvs-build (I have confirmed that i have installed gvsbuild correctly and there are all the compiled files in the folder). I have also tried adding the .dll files in the release folder with the .exe in the project. I have also checked the lib files are added to the project and the GTK-fortran compiled successfully as a static library with release x64, for which also added as a dependencies with the tickbox checked. However, with all these checked and confirmed, I still get the error of error in opening the compiled module file. I have also tried changing the lib file name from gtk-3 to gtk and also not worked. The error is showed below:

Any help would be great and appreciated!

2 Likes

Unhappily, I can’t help much concerning gtk-fortran under Windows and Visual Studio.

It seems the gtk-fortran\src\gtk.f90 module .mod file is not accessible.

Note also that the GTK 3 version of gtk-fortran is now also available as a fpm dependency:

But once again, I don’t know how to make the whole stuff work in Windows.