How to make Armadillo work on Windows?
armadillo, blas, c++, lapack, mingw32
Solution
It seems to work now! I am using the Lapack and BLAS from the webpage indicated in the Readme file that I compiled myself according to @enhzflep comments.
To link everything properly in Eclipse CDT right click on your project and go to properties, then:
- Under "C/C++ Build⟼Settings⟼GCC C++ Compiler⟼Command" type: `g++ -I"C:\Armadillo\include"` (replace with the correct path for your Armadillo folder). Make sure to do this for all Configurations (to be chosen in the drop-down menu at the top).
- Under "C/C++ Build⟼Settings⟼MinGW C++ Linker⟼Libraries" add `lapack` and `blas` to the Libraries.
- Under"C/C++ General⟼Paths and Symbols⟼GNU C++" add the path tot he `include` directory of your Armadillo folder `C:\Armadillo\include`.
It might be that it works with the original Lapack and BLAS files. It did not work for me, because I had only added the path to Armadillo under "C/C++ General⟼Paths and Symbols⟼GNU C++", which I guess only tells the editor what data types and functions to expect and not the compiler.
Problem
I cannot make Armadillo 4.3 work on Windows. The library `armadillo/include` is included and I run `g++ "-LC:\\Armadillo\\BLAS_Lapack" -o1 -o test.exe test.o -llapack -lblas`, then I get the following error message: ``` C:/Armadillo/include/armadillo_bits/blas_wrapper.hpp:183: undefined reference to `wrapper_ddot_' test.o: In function `ZN4arma4blas4gemvIdEEvPKcPKiS5_PKT_S8_S5_S8_S5_S8_PS6_S5_': C:/Armadillo/include/armadillo_bits/blas_wrapper.hpp:34: undefined reference to `wrapper_dgemv_' test.o: In function `ZN4arma4blas4gemmIdEEvPKcS3_PKiS5_S5_PKT_S8_S5_S8_S5_S8_PS6_S5_': C:/Armadillo/include/armadillo_bits/blas_wrapper.hpp:69: undefined reference to `wrapper_dgemm_' ``` If I run `g++ -o1 -o test.exe test.o -llapack -lblas`, I get ``` c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -llapack c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lblas ``` I did uncomment the configuration file `config.hpp` according to the README file. Does anybody know how to make Armadillo work? (I am using Eclipse CDT.)