您的位置:首页 > 其它

算法库:clapack安装配置

2015-11-27 00:45 190 查看
类似于opencv、jpeglib和pnglib的安装配置。

opencv安装配置见:/article/7079263.html

jpeglib和pnglib安装配置见:/article/7079271.html

clapack官方安装配置见:http://icl.cs.utk.edu/lapack-for-windows/clapack/index.html

官方有两种安装配置方法。这里阐述简单一种,即”Easy Windows Build”。官方阐述如下:

Downloadclapack-3.2.1-CMAKE.tgz and unzip.

Download cmake and install it on your machine.

Open CMAKE

Point to your CLAPACK-3.2.1-CMAKE folder in the source code folder

Point to a new folder where you want the build to be (not the same is better)

Click configure, check the install path if you want to have the libraries and includes in a particular location.

Choose Visual Studio Solution. You can also choose nmake or any other platform.

You may have to click again configure until everything becomes white

Click generate, that will create the Visual Studio for CLAPACK and you are done.

Close CMAKE

Look in your "build" folder, you have your CLAPACK Visual Studio Solution, just open it.

Build the "ALL_BUILD" project, it will build the solution and create the librarires

Build the "INSTALL". This will put the libraries and include in your install folder.

Build the "RUN_TESTS". The BLAS and CLAPACK testings will be run.

这里,我详细阐述一下自己的安装配置的过程。

首先,当然是要下载clapack文件。

下载的版本是:clapack-3.2.1-cmake.gz。

下载地址:http://icl.cs.utk.edu/lapack-for-windows/clapack/clapack-3.2.1-CMAKE.tgz

在C盘下新建目录clapack,然后将下载的clapack-3.2.1-CMAKE.gz文件复制进去,右击并选择“解压到当前文件夹”。在clapack目录下再新建一个目录clapack-3.2.1-BUILD。最终目录结构如下所示。





打开ckmake-gui,源码位置:C:/clapack/clapack-3.2.1-Cmake,生成文件选择:C:/clapack/clapack-3.2.1-BUILD。如下图所示。



点击左下角的“configure”,弹出编译器选择项,根据自己的实际情况选择即可。通常按其默认认即可。我安装的是vs2013,所以选择“visual studio 2013”。如下图所示。



单击“Finish”后就开始编译啦。编译结束后,再次或反复单击“configure”,直到背景变成白色。根据需要可选择“USE_BLAS_WARP”。再次反复单击“configure”,直到背景变成白色。



最后单击“generate”,生成结束后就会在C:\clapack\clapack-3.2.1-Build下生成“CLAPACK.sln”,用vs打开。先编译“ALL_BUILD”,再编译“INSTALL”,最后编译“RUN_TESTS”。编译过程中,可能会有些失败,无需要理会。

以上都编译结束后,将会在C:\Program Files (x86)\CLAPACK下生成所需要的头文件和库文件。

接下来就配置工程。

vc++包含目录添加:C:\Program Files (x86)\CLAPACK\include

vc++库目录添加:C:\Program Files (x86)\CLAPACK\lib

链接器->输入->附加依赖项添加:blasd.lib, lapackd.lib, libf2cd.lib
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: