OK, good hint. The issue was solved for first test. However; the second test is a new issue. This time I wrote command as:
gfortran -o main.exe test_lapack.f95 -L(path to the first library) -l(first library’s name) -L(path to the second library) -l(second library’s name)
This time the error was too long. For being reproducible, the first library is liblapack.dll and the second is libblas.dll.
Also, I tried it with just libblas, it showed:
test_blas.o:test_blas.f95:<.txt0x4>: undefined reference to ‘dposv_’
collect2.exe: error: ld returened 1 exit status
I am really confused.