I'm trying to include the Armadillo C++ library, a linear algebra library, in a C++ project I'm working on, and I'm having a difficult time figuring out how to do so. I'm unfamiliar with how to add libraries to a project in general, so I've been searching for a resource that has step by step instructions, and the best one I could find didn't work for me (http://codeyarns.com/2013/11/15/how-to-use-armadillo-on-windows/). I followed all the instructions on the web page, and Visual Studio still complains when I put #include <armadillo>
and using namespace arma
in my code. Does anyone have any idea what I'm doing wrong?
Asked
Active
Viewed 7,115 times
1

Rootbeer
- 13
- 1
- 3
-
Look in the `examples` folder that comes with the Armadillo .tar.gz archive. It contains a readme file, and an example project for MSVC. – mtall Oct 06 '15 at 01:17
-
In your VS project, in the properties pages, add the full path to the armadillo include folder into the include path. (And you might need to `#include "armadillo"`.) – 1201ProgramAlarm Oct 06 '15 at 01:18
1 Answers
3
I have put all the .lib and .dll files in a directory which is added to the PATH system environment variable
and then you just have to add the correct include and library directories in VS2015

Claes Rolen
- 1,446
- 1
- 9
- 21
-
Hi @Claes Rolen, and everyone who has visited here on this post. How can I get all of the DLLs and libs files? I followed the link to the source code, but I could not find those files there. Do I need to use Cmake to rebuild the code for getting thems? Thank you for your time. – NguyenHai Feb 11 '23 at 09:03
-
1Hi @NguyenHai, if you download the Armadillo package it has OpenBLAS lib under ./example/lib_win64. OpenBLAS implements the BLAS and most important features from Lapack – Claes Rolen Feb 11 '23 at 21:06
-
Thank you very much for your reply, even though this post has not been updated for a long time. I really appreciated it. I have downloaded the Armadillo latest package from http://arma.sourceforge.net/. I unpacked it on Windows, and only found libopenblas.dll and libopenblas.lib in the example folder. How may I get all of the blas_win64 or lapack_win64 dlls/libs like what you have in your answer ? – NguyenHai Feb 13 '23 at 06:17
-
2You don't need them anymore, OpenBLAS includes both. If you want to use BLAS and Lapack you can download an old Armadillo version where they are included e.g. 9.900.5 https://sourceforge.net/projects/arma/files/armadillo-9.900.5.tar.xz/download – Claes Rolen Feb 13 '23 at 22:28
-
Hi @Claes Rolen, Thank you very much for your answer and your time. That is clear now. It works! The libopenblas.dll should be sufficient. – NguyenHai Feb 14 '23 at 03:15