2015-06-20 73 views
0

我想在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变量中?谢谢。

+0

您可能需要使用-lm – Zeus

+0

'-I'选项不起作用。还是一样的错误。任何意见? –

回答

0

这只是一个猜测,但你可能尝试改变 “C:\” 从

"C:\MinGW\lapack-3.5.0\bin" 

到Linux目录命名约定,即

"/MinGW/lapack-3.5.0/bin" 
在设置 -

>Ç/C++构建 - > MinGW C++链接器 - >库 - >库搜索路径,如果您使用的是Photran。

相关问题