所有
摘要......
我正在尝试编译example.cpp arma.sourceforge.net/docs.html#example_prog
我尝试用lapack和blas编译和链接armadillo。 我总是得到同样的错误。 返回此消息
ld.exe: cannot find -llapack
ld.exe: cannot find -lblas
我确认以下所有路径都是正确的并运行以下内容。
g++ example.cpp -o example -O1 -I..\..\lapackblas_headers\lapack -I..\..\lapackblas_headers\blas -I..\include
-L .... \ lapackblas_MD_debug -llapack -lblas
返回此消息
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返回1退出状态
Andre Mikulec Andre_Mikulec@Hotmail.com
详情请遵循......
我下载了LAPACK和BLAS的预编译版本从...下载 http://www.fi.muni.cz/~xsvobod2/misc/lapack/
我按照这里的说明进行操作
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
这
arma.sourceforge.net/download.html#windows
我有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
我尝试用lapack和blas编译和链接armadillo。 我总是得到同样的错误。
M:
cd \YDrive\All_Economics\eclipse_workspace\armadillo-3.800.0\examples
M:\YDrive\All_Economics\eclipse_workspace\armadillo-3.800.0\examples>
我尝试了相对路径
g++ example.cpp -o example -O1 -I..\..\lapackblas_headers\lapack -I..\..\lapackblas_headers\blas -I..\include
-L..\..\lapackblas_MD_debug -llapack -lblas
我尝试了绝对路径
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
在所有情况下,返回的信息都在这里
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
有什么想法吗?
谢谢。 安德烈米库莱克 Andre_Mikulec@Hotmail.com
答案 0 :(得分:3)
我找到了部分解决方案。
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
此页面解释了它。 http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs
基本上,我需要在主程序
之后直接在命令行上指定DLL文件另外,要完成解决方案,我必须安装(尚未)依赖的DLL 来自英特尔Fortran编译器(或30天eval)。
这个页面(我获得了DLL)解释了它(在细则中)。
LAPACK & BLAS precompiled binaries for Win32 platform
http://www.fi.muni.cz/~xsvobod2/misc/lapack/