step 1: 下載ARPACK , mingw-w64-install 和 mingw-get-inst-20120426.exe;c++
step 2: 安裝 MinGW-64默認安裝路徑便可.shell
step 2: 由於須要使用MinGW shell,因此須要安裝mingw-get-inst-20120426.exe一樣選擇默認安裝路徑至少選擇c,c++,fortran,msys.下圖是個人選擇.net
step 3: 將 ARPACK文件夾拷至d盤根目錄,按以下修改ARmake.inc:(注意路徑)3d
home = /d/ARPACK
PLAT = x64
FC = /c/Program\ Files\ \(x86\)/mingw-w64/i686-4.9.3-posix-dwarf-rt_v4-rev1/mingw32/bin/gfortran.exe
FFLAGS = -O
RANLIB = /c/Program\ Files\ \(x86\)/mingw-w64/i686-4.9.3-posix-dwarf-rt_v4-rev1/mingw32/bin/ranlib.exeblog
step 5:打開MinGW shell(雙擊C:\MinGW\msys\1.0\msys.bat)get
執行以下操做
cd /d/ARPACK編譯
export PATH=$PATH:/c/Program\ Files\ \(x86\)/mingw-w64/i686-4.9.3-posix-dwarf-rt_v4-rev1/mingw32/opt/bin搜索
step 7: 刪除d/ARPACK/UTIL/second.f中的EXTERNAL ETIME.下載
step 8:將 .f 文件編譯成 .o文件im
make lib
編譯以後會在ARPACK文件夾下生成libarpack_x64.a
step 9:wrap the *.o to .dll
/c/Program\ Files\ \(x86\)/mingw-w64/i686-4.9.3-posix-dwarf-rt_v4-rev1/mingw32/bin/dllwrap.exe --export-all-symbols BLAS/*.o LAPACK/*.o SRC/*.o UTIL/*.o -lgfortran --output-def arpack_x64.def -o arpack_x64.dll
step 10: 在win10的搜索欄中搜索vs點擊進入
在控制檯中依次輸入以下內容
d:
cd ARPACK
lib.exe /machine:X86 /def:arpack_x64.def
以後就會在d:/ARPACK中生成 .dll .lib
---------------------
參考:https://blog.csdn.net/treeshy/article/details/64539742
https://blog.csdn.net/barcelona941017/article/details/79727784