vmagnin / gtk-fortran

A GTK / Fortran binding, and its documentation in the Wiki tab.
GNU General Public License v3.0
256 stars 43 forks source link

Building now fails in MSYS2/Windows10 [-Wmissing-include-dirs] #261

Closed vmagnin closed 2 years ago

vmagnin commented 2 years ago

Describe the bug Building now fails in MSYS2/Windows10 with a lot of warnings 951.exe: Warning: Nonexistent include directory 'modules/' [-Wmissing-include-dirs] although those modules directories do exist:

[ 10%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk.f90.obj
f951.exe: Warning: Nonexistent include directory 'modules/' [-Wmissing-include-dirs]
D:/Logiciels/MSYS2/home/user/gtk-fortran/src/gtk.f90:77:9:

   77 |     use g, only: g_signal_connect_data
      |         1
Fatal Error: Cannot open module file 'g.mod' for reading at (1): No such file or directory
compilation terminated.
make[2]: *** [src/CMakeFiles/gtk-fortran_object.dir/build.make:127: src/CMakeFiles/gtk-fortran_object.dir/gtk.f90.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:271: src/CMakeFiles/gtk-fortran_object.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

Your system:

Additional context See also https://fortran-lang.discourse.group/t/help-installing-fpm/3873/15

vmagnin commented 2 years ago

I have reinstalled MSYS2 and I now use the CRT64 environment instead of MINGW64. It fixed the problem.