I have done the command “$env:Path = “C:\gtk-build\gtk\x64\release\bin;” + $env:Path” to add the path with administrator in powershell and also manually added the path to the environment variables. In another PC, I have tried adding the dll into the System32 folder directly and worked, but dont think that this is a good practice. Thus, I would like to ask anyone who knows how to fix this issue!
I don’t have much of a solution for you as I’m not familiar with GTK-Fortran, but you should verify that C:\gtk-build\gtk\x64\release\bin actually contains the DLL.
If you load your exe in it the application will tell you exactly which DLLs it tries to load at startup. It will also show the location of the DLLs Windows was able to find. It could be worth using it on your application to see exactly what’s missing.
An alternative to putting the DLLs into System32 is also to put them in the same folder as the exe-file.
Thank you for the suggestion! For now, I guess I will just pull the dll in the folder with the exe for simplicity, as this is at least more organised than just placing them in system 32.
I have no experience with MS Windows programming, but I’m guessing that $env:Path is the search path for executables. You need instead to change the search path for libraries, or to add that search path explicitly when you load the program. I know how to do those things on unix/posix machines, but there must be some similar way on Windows machines too.
There are explanations about setting the path to DLLs. I don’t know if that could fix your problem. But that blog may be interesting for Windows users wanting to start with gtk-fortran.