1 year ago

#62238

test-img

M. Mustafa

`_gfortran_os_error_at could not be located in the dynamic link library` with allocatable variable using MSYS2

I am having this strange error when compiling a simple code using msys2:

The procedure entry point _gfortran_os_error_at could not be located in the dynamic link library

Other compiler implementations work fine.

Here is the code:

PROGRAM MAIN
IMPLICIT NONE
INTEGER :: N
REAL(8), ALLOCATABLE, DIMENSION(:,:) :: X
N = 10
ALLOCATE(X(N,N))
DEALLOCATE(X)
END PROGRAM MAIN

The compiler is GNU Fortran (Rev6, Built by MSYS2 project) 11.2.0

The compiling method is

gfortran -o main.exe main.f90

I noticed that when I link the program with -static it surprisingly works. I am not sure if this is a common problem with gfortran compilers.

dll

fortran

gfortran

msys2

0 Answers

Your Answer

Accepted video resources