All,
Summary ...
I am trying to compile example.cpp of arma.sourceforge.net/docs.html#example_prog
I try to compile and link armadillo with lapack and 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
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
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/
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
I have lapack and blas libraries
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
I try to compile and link armadillo with lapack and 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
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
Basically, I needed to specify the DLL files directly on the command line after the main program
Also, to FINISH TO SOLUTION, I have to install the (yet) dependent DLLs from an Intel Fortran compiler ( or 30 day eval ).
This page ( were I aquired the DLLs ) explains it ( in the fine print ).
LAPACK & BLAS precompiled binaries for Win32 platform
http://www.fi.muni.cz/~xsvobod2/misc/lapack/