我想在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。
使用cygwin编译程序test1.f90
很顺利,这是命令:
gfortran test1.f90 -o test1 -L "C:\MinGW\lapack-3.5.0\bin" -llapack
lapack-3.5.0\
下,libs在lib文件夹中,dll在bin文件夹中但我有错误,
error while loading shared libraries: ?: cannot open shared object file: No such file or directory
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 :(得分:0)
这只是一个猜想,但您可以尝试将“C:\”更改为Linux目录命名约定,即来自
"C:\MinGW\lapack-3.5.0\bin"
到
"/MinGW/lapack-3.5.0/bin"
in Settings-> C / C ++ Build-> MinGW C ++ Linker->图书馆 - >如果您使用Photran,则可以使用库搜索路径。