简体   繁体   English

如何在 Windows 上为 MSVS 2010 安装 LAPACK?

[英]How to install LAPACK for MSVS 2010 on windows?

I am using the ITPP library (IT++ library) for one of my projects.我正在为我的一个项目使用 ITPP 库(IT++ 库) For using the eigen_sym() function of this library, it asks for installing the LAPACK.为了使用这个库的 eigen_sym() 函数,它要求安装 L​​APACK。 I tried the direct prebuilt libraries for Windows but still get the error.我尝试了 Windows 的直接预构建库,但仍然出现错误。 Finally on the following site:最后在以下网站:

http://icl.cs.utk.edu/lapack-for-windows/lapack/#libraries http://icl.cs.utk.edu/lapack-for-windows/lapack/#libraries

I found a solution under "Build Instructions to create LAPACK and LAPACKE 3.5.0 dlls for Windows with MinGW" that might work.我在“使用 MinGW 为 Windows 创建 LAPACK 和 LAPACKE 3.5.0 dll 的构建说明”下找到了一个可能有效的解决方案。 I did steps 1 to 5 but got stuck 6 onwards.我做了第 1 步到第 5 步,但在第 6 步之后就卡住了。

My destination of the cmake build is E:/LAPACK我的 cmake 构建目标是E:/LAPACK

I got an error while in the cmd prompt while entering:在 cmd 提示符下输入时出现错误:

cd E:/LAPACK 3.5.0 >Enter
C:/MinGW/bin/mingw32-make.exe >Enter

i'm getting我越来越

mingw32-make.exe> No targets specified and no make file found. Stop.

Can someone explain the step 6 onwards in detail and tell me where i'm going wrong?有人可以详细解释第 6 步,并告诉我哪里出错了吗? I finally want to get the .dll and .lib files.我终于想得到.dll.lib文件。

I was able to build LAPACK 3.5 for windows using mingw and pretty much the build guide from the LAPACK page.我能够使用 mingw 和几乎来自 LAPACK 页面的构建指南为 Windows 构建 LAPACK 3.5。 Using the following steps使用以下步骤

  1. Download lapack.tgz from here http://netlib.org/lapack/lapack.tgz从这里下载 lapack.tgz http://netlib.org/lapack/lapack.tgz
  2. Extract to a folder.解压到一个文件夹。 I used 7zip file manager to extract the tarball to x:/Other/test我使用 7zip 文件管理器将 tarball 解压缩到 x:/Other/test
  3. Install mingw32.安装mingw32。 I used this: http://www.mingw.org/download/installer and I selected and installed mingw32-developer-toolkit + mingw32-base + mingw32-gfortran + mingw32-gcc-g++ + msys-base我使用了这个: http : //www.mingw.org/download/installer ,我选择并安装了mingw32-developer-toolkit + mingw32-base + mingw32-gfortran + mingw32-gcc-g++ + msys-base
  4. Open a command prompt打开命令提示符
  5. Append mingw to your path将 mingw 附加到您的路径

    path=C:/Mingw/bin;%PATH%路径=C:/Mingw/bin;%PATH%

  6. change directory to the location you extracted lapack: For me this was X:\\Other\\Test\\lapack-3.5.0 so the command I typed was the following (your path will be different):将目录更改为您提取 lapack 的位置:对我来说,这是 X:\\Other\\Test\\lapack-3.5.0 所以我输入的命令如下(您的路径将不同):

    C:\\Users\\jdrescher>x: C:\\Users\\jdrescher>x:
    X:>cd Other\\Test\\lapack-3.5.0 X:>cd Other\\Test\\lapack-3.5.0
    X:\\Other\\Test\\lapack-3.5.0> X:\\Other\\Test\\lapack-3.5.0>

  7. make a folder for your build.为您的构建创建一个文件夹。 I used build我用构建

    X:\\Other\\Test\\lapack-3.5.0>mkdir build X:\\Other\\Test\\lapack-3.5.0>mkdir build

  8. then change directory to the build folder然后将目录更改为构建文件夹

    X:\\Other\\Test\\lapack-3.5.0>cd build X:\\Other\\Test\\lapack-3.5.0>cd build
    X:\\Other\\Test\\lapack-3.5.0\\build> X:\\Other\\Test\\lapack-3.5.0\\build>

  9. Now configure with CMake现在使用 CMake 进行配置

    X:\\Other\\Test\\lapack-3.5.0\\build>cmake -G "MinGW Makefiles" -D BUILD_SHARED_LIBS=ON -D CMAKE_GNUtoMS=ON .. X:\\Other\\Test\\lapack-3.5.0\\build>cmake -G "MinGW Makefiles" -D BUILD_SHARED_LIBS=ON -D CMAKE_GNUtoMS=ON ..

  10. Now use gnu make to build LAPACK现在使用 gnu make 构建 LAPACK

    X:\\Other\\Test\\lapack-3.5.0\\build>c:\\MinGW\\bin\\mingw32-make.exe X:\\Other\\Test\\lapack-3.5.0\\build>c:\\MinGW\\bin\\mingw32-make.exe

    Note: This step will take several minutes.注意:此步骤将需要几分钟时间。

After the above steps completed 100% with no errors, I have the following dlls in the build\\bin folder: libblas.dll , liblapack.dll , libtmglib.dll在上述步骤 100% 无错误完成后,我在 build\\bin 文件夹中有以下 dll: libblas.dllliblapack.dlllibtmglib.dll

Also the following libraries, and exp files in the build\\lib folder: libblas.exp , libblas.lib , liblapack.exp , liblapack.lib , libtmglib.exp and libtmglib.lib .还有以下库和 build\\lib 文件夹中的 exp 文件: libblas.explibblas.libliblapack.expliblapack.liblibtmglib.explibtmglib.lib

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM