简体   繁体   English

Armadillo C ++和BLAS和ATLAS在mingw32下找不到lapack blas

[英]Armadillo C++ and BLAS and ATLAS cannot find lapack blas under mingw32

All, 所有,

Summary ... 总结...

I am trying to compile example.cpp of arma.sourceforge.net/docs.html#example_prog 我正在尝试编译arma.sourceforge.net/docs.html#example_prog的example.cpp

I try to compile and link armadillo with lapack and blas. 我尝试编译犰狳与lapack和blas。 I am always getting the same error back. 我总是收到相同的错误。 This message is returned 返回此消息

ld.exe: cannot find -llapack
ld.exe: cannot find -lblas

I verified that all of my paths below are correct and ran the following. 我确认以下所有路径均正确,并执行以下操作。

g++ example.cpp -o example -O1  -I..\..\lapackblas_headers\lapack -I..\..\lapackblas_headers\blas  -I..\include 

-L....\\lapackblas_MD_debug -llapack -lblas -L .... \\ lapackblas_MD_debug -llapack -lblas

This message is returned 返回此消息

ld.exe: cannot find -llapack
ld.exe: cannot find -lblas

FROM

f:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -llapack
f:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lblas

collect2: ld returned 1 exit status collect2:ld返回1退出状态

Andre Mikulec Andre_Mikulec@Hotmail.com 安德烈·米库勒克(Andre Mikulec)Andre_Mikulec@Hotmail.com

Details follow ... 详细信息如下...

I downloaded pre-compiled versions of LAPACK and BLAS were downloaded from ... http://www.fi.muni.cz/~xsvobod2/misc/lapack/ 我从以下网站下载了LAPACK和BLAS的预编译版本: http://www.fi.muni.cz/~xsvobod2/misc/lapack/

I am following the instructions here 我正在按照说明进行操作

https://sourceforge.net/projects/arma/files/latest/download
http://sourceforge.net/projects/arma/files/armadillo-3.800.0.tar.gz
file:///M:/YDrive/All_Economics/eclipse_workspace/armadillo-3.800.0/README.txt

From

arma.sourceforge.net/download.html#windows arma.sourceforge.net/download.html#windows

I have lapack and blas libraries 我有lapack和blas库

ls -alrt ../../lapackblas-MD-debug

-rw-r--r--  1 Administrator Administrators   27092 Oct  5  2009 blas_win32_MDd.lib
-rwxr-xr-x  1 Administrator Administrators  280576 Oct  5  2009 blas_win32_MDd.dll
-rw-r--r--  1 Administrator Administrators  254886 Oct  5  2009 lapack_win32_MDd.lib
-rwxr-xr-x  1 Administrator Administrators 3774464 Oct  5  2009 lapack_win32_MDd.dll
drwxr-xr-x  2 Administrator Administrators       0 Mar  3 08:02 .
drwxr-xr-x 10 Administrator Administrators       0 Mar  3 08:06 ..

ls -alrt ../../lapackblas_headers/blas

MANYFILES.h

ls -alrt ../../lapackblas_headers/lapack

MANYFILES.h

ls -alrt ../include

MANYFILES.h MANYFILES.h

I try to compile and link armadillo with lapack and blas. 我尝试编译犰狳与lapack和blas。 I am always getting the same error back. 我总是收到相同的错误。

M:
cd \YDrive\All_Economics\eclipse_workspace\armadillo-3.800.0\examples

M:\YDrive\All_Economics\eclipse_workspace\armadillo-3.800.0\examples>

I tried relative paths 我尝试了相对路径

g++ example.cpp -o example -O1  -I..\..\lapackblas_headers\lapack -I..\..\lapackblas_headers\blas  -I..\include 

-L..\..\lapackblas_MD_debug -llapack -lblas 

I tried absolute paths 我尝试了绝对路径

g++ example.cpp -o example -O1  -IM:\YDrive\All_Economics\eclipse_workspace\lapackblas_headers\lapack  

-IM:\YDrive\All_Economics\eclipse_workspace\lapackblas_headers\blas  

-IM:\YDrive\All_Economics\eclipse_workspace\armadillo-3.800.0\include 

-LM:\YDrive\All_Economics\eclipse_workspace\lapackblas_MD_debug -llapack -lblas

In all cases returned information is here 在所有情况下,返回的信息都在这里

ld.exe: cannot find -llapack
ld.exe: cannot find -lblas

f:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -llapack
f:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lblas
collect2: ld returned 1 exit status

Any ideas? 有任何想法吗?

Thank you. 谢谢。 Andre Mikulec Andre_Mikulec@Hotmail.com 安德烈·米库勒克(Andre Mikulec)Andre_Mikulec@Hotmail.com

I found the partial solution. 我找到了部分解决方案。

g++ -o example example.cpp ..\..\lapackblas_MD_debug\blas_win32_MDd.dll ..\..\lapackblas_MD_debug\lapack_win32_MDd.dll -O1  -I..\..\lapackblas_headers\lapack -I..\..\lapackblas_headers\blas  -I..\include 

This page explains it. 此页对此进行了说明。 http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs

Basically, I needed to specify the DLL files directly on the command line after the main program 基本上,我需要在主程序之后直接在命令行上指定DLL文件

Also, to FINISH TO SOLUTION, I have to install the (yet) dependent DLLs from an Intel Fortran compiler ( or 30 day eval ). 另外,要解决该问题,我必须从Intel Fortran编译器(或30天eval)安装(尚未)依赖的DLL。

This page ( were I aquired the DLLs ) explains it ( in the fine print ). 此页面(在我获得DLL的情况下)对其进行了解释(精美印刷)。

LAPACK & BLAS precompiled binaries for Win32 platform
http://www.fi.muni.cz/~xsvobod2/misc/lapack/

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

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