0

I am struggling to build an armadillo example with the blas and lapack libraries.

This is my build log:

19:34:02 **** Rebuild of configuration Debug for project Amatest2 ****
Info: Internal Builder is used for build
g++ "-IC:\\temp\\armadillo-4.400.1MT\\include" -O3 -g3 -Wall -c -fmessage-length=0 -o example1.o "..\\example1.cpp" 
g++ "-LC:\\temp\\armadillo-4.400.1MT\\examples\\lib_win64" -o Amatest2.exe example1.o  -llapack_win64_MT -lblas_win64_MT 
example1.o: In function `dot<double>':
C:/temp/armadillo-4.400.1MT/include/armadillo_bits/blas_wrapper.hpp:183: undefined reference to `ddot_'

This is a part of my config.hpp:

#if !defined(ARMA_USE_LAPACK)
 #define ARMA_USE_LAPACK
#endif
#if !defined(ARMA_USE_BLAS)
 #define ARMA_USE_BLAS
#endif
#if !defined(ARMA_USE_ARPACK)
// #define ARMA_USE_ARPACK
#endif
// #define ARMA_USE_WRAPPER
// #define ARMA_BLAS_CAPITALS
#define ARMA_BLAS_UNDERSCORE

I am using eclipse. I have followed the README file, but still no luck. Can somebody provide a light at the end of the tunnel?

Best regards, George

geogerber
  • 1
  • 2

1 Answers1

1

You're using g++ under Windows, which I suspect is from the MinGW project. The precompiled BLAS and LAPACK libraries that come with Armadillo are designed to link with the MSVC "compiler". MinGW may not like these. I suggest you try BLAS and LAPACK libraries compiled with gcc/gfortran from MinGW. Try this site: http://icl.cs.utk.edu/lapack-for-windows/lapack/

mtall
  • 3,574
  • 15
  • 23