[SOLVED] Using Armadillo library on QT creator
-
Hello, I am trying to run a test for the Armadillo library (5.2) which I have downloaded and I have uncommented the lines
cmakedefine ARMA_USE_LAPACK
andcmakedefine ARMA_USE_BLAS
in the config.hpp.cmake file as recommended for Windows here. I have set the .pro file as suchQT += core QT -= gui TARGET = armatest CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += \ main.cpp INCLUDEPATH += C:\Armadillo\include LIBS += -LC:\Armadillo\lib_win64 -llapack_win64_MT -lblas_win64_MT
Considering that lapack_win64_MT.lib and blas_win64_MT.lib are the libraries located in C:\Armadillo\lib_win64\
The error I keep on receiving is
undefined reference to 'dgetrf_' undefined reference to 'ddot_' undefined reference to 'dgemv_'
etc. as if I am not linking the libraries properly. What am I missing?
-
-
Hi,
To add to @Pablo-J.-Rogina: is it a typo or are you missing the backslashes on the LIBS lines ?
-
Update: I found out one of the problems was the wrong version for the BLAS and LAPACK libraries. I downloaded the 32-bit and compiles fine with Code::Blocks but I still have the problem with Qt creator (which uses the same compiler as Code::Blocks!). I reckon it may be a problem with the .pro file. @SGaist where should I add the backslashes? Can you give me an example?
-
LIBS += \ -LC:\Armadillo\lib_win64 \ -llapack_win64_MT \ -lblas_win64_MT
-
You're welcome !
Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)
Up voting the answers that helped you will also allow other users to more easily find them.