[mlpack] Problem building MLPACK - CF linking error

Gilles Barges gbarges at free.fr
Mon Aug 18 23:32:02 EDT 2014


>  I am trying to link MLPACK with my project in Qt Creator using MinGW and I keep getting a linking error that relates to Armadillo and LAPACK/BLAS libraries. 
> 
> 
> Below are the lines in my .pro file: 

I don't know what is a .pro file.

Please give the full command that generated the error (VERBOSE=1 make) and the error message.

Armadillo can be used in 2 ways, with or without a wrapper.

Without wrapper, Armadillo is a 100% source only library, so you do not have to link something more. You will need -lblas -llapack or the like in yours linker options.
With a wrapper, armadillo.dll is generated, it covers only calls to BLAS/LABPACK. So you link with -larmadillo only (hoping that this will suffice to pull BLAS/LALACK along)

Personnally, I don't see any advantage using the wrapper. It brings one more library to deal with (the one that cause your trouble) and anyway I have already tons of linker options to build my app.
I'm not afraid to add -lblas -llapack (or -framework Accelerate on OSX)

To select wrapper use, edit the file armadillo_bits/config.hpp, and comment/uncomment the flag ARMADILLO_USE_WRAPPER. Nothing to recompile.

Note: probably, mlpack and your app must be compiled in a coherent way regarding this choice.

--
Gilles Barges.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack/attachments/20140819/f4cb0242/attachment.html>


More information about the mlpack mailing list