Skip to content

Commit a01b254

Browse files
authored
Fix gfortran 11 linking issue on Windows (#58)
Programs compiled with gfortran 11 on Windows could link against the libgfortran-5.dll found in /c/mingw64/bin, which is associated with gfortran 12 (installed by default on Windows 2022 runner image). The simple solution is to move the entire mingw64 folder instead of just a few files.
1 parent adec3af commit a01b254

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

setup-fortran.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,7 @@ install_gcc_choco()
9898
echo "GCC $version already installed"
9999
else
100100
# otherwise hide preinstalled mingw compilers
101-
mkdir "$RUNNER_TEMP/mingw64"
102-
mv /c/mingw64/bin/gfortran "$RUNNER_TEMP/mingw64/gfortran"
103-
mv /c/mingw64/bin/gcc "$RUNNER_TEMP/mingw64/gcc"
104-
mv /c/mingw64/bin/g++ "$RUNNER_TEMP/mingw64/g++"
101+
mv /c/mingw64 "$RUNNER_TEMP/"
105102
# ...and install selected version
106103
case $version in
107104
13)

0 commit comments

Comments
 (0)