我想在Windows平台上运行带有LAPACK库的Fortran程序(GNU GCC Fortran编译器)。我遵循网页http://icl.cs.utk.edu/lapack-for-windows/lapack/构建说明中列出的说明,为MinGW创建用于Windows的LAPACK和LAPACKE 3.5.0 dll我尝试使用方法Configuring LAPACK in Eclipse-Photran for fortran compiler on Windows。在Windows上使用LAPACK在Fortran程序中运行时错误
编译程序test1.f90
使用Cygwin去细,这里是命令:
gfortran test1.f90 -o test1 -L "C:\MinGW\lapack-3.5.0\bin" -llapack
- 我已经LAPACK安装在 “C:\ MinGW的\ LAPACK-3.5.0”,
lapack-3.5.0\
下,库都在lib文件夹,DLL是在bin文件夹 - “C:\ MinGW的\ BIN” 被添加到PATH变量
但我得到的错误,
- 与Cygwin的运行提供了错误
error while loading shared libraries: ?: cannot open shared object file: No such file or directory
- 与Windows终端运行给出错误
The program cannot start because liblapack.dll is missing from your computer. Try reinstalling the program to fix this problem,
当我选中 “C:\ MinGW的\ LAPACK-3.5.0 \ BIN”,liblapack.dll有。有什么想法发生在这里?我是否需要将库的目录添加到PATH变量中?谢谢。
您可能需要使用-lm – Zeus
'-I'选项不起作用。还是一样的错误。任何意见? –