You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm installing Fortran 90 environment in Windows, with JetBrains CLion and your plugin, with "mingw-w64".
With default "Run/debug configurations" in CLion, building and running a "Hello world" example will raise an error: cannot find libgfortran-5.dll ... It means "CMake" file only recognizes gfortran.exe itself, but cannot recognize any DLL in the same folder.
I tried to include the .../mingw64/bin folder with link_directories or link_module or link_libraries in CMake file, but none of them works. I also tried to include .../mingw64/bin in environment variable PATH. I tried three places of PATH: CLion "Run/debug configurations", system settings, and CMake file. However, still none of them works.
Finally, I found a solution: I set the "working directory" to .../mingw64/bin in "Run/debug configurations" and this error is resolved.
However, set the "working directory" means cd to .../mingw64/bin in terminal. I'm worried if it will break the relative path in the program. For example, if I import package.f in main.f, I'm not sure if it can correctly locate package.f. (Please allow me to use Python term, because I'm a beginner of Fortran, I don't know how "import" works in Fortran.)
Is my practice of setting the "working directory" to .../mingw64/bin the correct way?
Thanks for answering my question.
The text was updated successfully, but these errors were encountered:
I'm installing Fortran 90 environment in Windows, with JetBrains CLion and your plugin, with "mingw-w64".
With default "Run/debug configurations" in CLion, building and running a "Hello world" example will raise an error: cannot find
libgfortran-5.dll
... It means "CMake" file only recognizesgfortran.exe
itself, but cannot recognize any DLL in the same folder.My "CMake" file is:
I tried to include the
.../mingw64/bin
folder withlink_directories
orlink_module
orlink_libraries
in CMake file, but none of them works. I also tried to include.../mingw64/bin
in environment variablePATH
. I tried three places ofPATH
: CLion "Run/debug configurations", system settings, and CMake file. However, still none of them works.Finally, I found a solution: I set the "working directory" to
.../mingw64/bin
in "Run/debug configurations" and this error is resolved.However, set the "working directory" means
cd
to.../mingw64/bin
in terminal. I'm worried if it will break the relative path in the program. For example, if I importpackage.f
inmain.f
, I'm not sure if it can correctly locatepackage.f
. (Please allow me to use Python term, because I'm a beginner of Fortran, I don't know how "import" works in Fortran.)Is my practice of setting the "working directory" to
.../mingw64/bin
the correct way?Thanks for answering my question.
The text was updated successfully, but these errors were encountered: