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

**URL:** <https://fortran-lang.discourse.group/t/gtk-fortran-gtk3-for-visual-studio-community-2022-error-in-opening-the-compiled-module-file/8374>\
**Category:** Help\
**Created:** [July 22, 2024, 6:08am UTC](https://fortran-lang.discourse.group/t/gtk-fortran-gtk3-for-visual-studio-community-2022-error-in-opening-the-compiled-module-file/8374 "2024-07-22T06:08:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alphahui](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@alphahui](https://fortran-lang.discourse.group/u/alphahui)\
**Post date:** [July 22, 2024, 6:08am UTC](https://fortran-lang.discourse.group/t/gtk-fortran-gtk3-for-visual-studio-community-2022-error-in-opening-the-compiled-module-file/8374/1 "2024-07-22T06:08:57Z")

</div>

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)](https://yolegu.xyz/post/2022-05-11-fortran-gui-with-gtk-fortran-installation/) but gvsbuild installed with the recommended way on [GitHub - wingtk/gvsbuild: GTK stack for Windows](https://github.com/wingtk/gvsbuild). 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:

 ![Screenshot 2024-07-22 134823](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/c/cce00462c041d0e760acff0695fb118a9dd03511.png)

Any help would be great and appreciated!

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [July 23, 2024, 9:22am UTC](https://fortran-lang.discourse.group/t/gtk-fortran-gtk3-for-visual-studio-community-2022-error-in-opening-the-compiled-module-file/8374/2 "2024-07-23T09:22:09Z")

</div>

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:

> [@Gtk-fortran for GTK 3 can now also be used as a fpm dependency and with MacPorts](https://fortran-lang.discourse.group/t/gtk-fortran-for-gtk-3-can-now-also-be-used-as-a-fpm-dependency-and-with-macports/7990):
>
> The gtk3 branch of gtk-fortran has been exceptionnally updated with backports from gtk4 and can now be used as a fpm dependency. The Fortran interfaces have been regenerated: nothing new of course concerning GTK 3.24 itself (last GTK 3 version released in 2018), but it includes especially the latests GLib 2.80 and Cairo 1.18. See the [CHANGELOG.md](https://github.com/vmagnin/gtk-fortran/blob/gtk3/CHANGELOG.md) file. You may be interested by this branch if you don’t plan to migrate toward GTK 4, or if you use Glade (For GTK 4, Cambalache is not yet in version…

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