I found the key seems to be use gfortran
instead of dllwrap
. Here's the whole process I used after installing MinGW and msys
1) Run the post install script and make sure it doesn't complain about missing gcc, etc. If it does, install those packages.
msys\1.0\postinstall\pi.bat
2) Extract ARPACK files and the patch into msys\1.0\home\yourname\ARPACK
3) Edit ARmake.inc
and change the FC
and FFLAGS
lines to:
FC = gfortran
#FFLAGS = -O -cg89
4) Edit UTIL/second.f
and replace everything with this. This prevents an error about ETIME. Not sure what it does but it's suggested by http://blog.csdn.net/guillotine007/article/details/8636647
SUBROUTINE SECOND( T )
REAL T
CALL CPU_TIME(T)
RETURN
END
5) Compile to .o files
make lib
6) Use gfortran instead of dllwrap to link and create the dll
gfortran -shared BLAS/*.o LAPACK/*.o SRC/*.o UTIL/*.o -o arpack_win32.dll
7) The resulting dll depends on 3 other dlls: libgcc_s_dw2-1.dll
, libgfortran-3.dll
, libquadmath-0.dll
which you can get from the MinGW installation.