0

I am trying to setup Armadillo in my c++ project. I have previolsy used codeblocks, but Now I want to use eclispse. I create a new project in eclipse, and I link to the openblas and lapack libs and include folder, and I have put the .dll files in the same folder as the executable. It works fine when I just make a simple helloworld.cpp file, but when I copy over a bunch of other .cpp and .h (sourse and header-files from my project from codeblocks) into my project, I get this error:

src\BallJoint.o: In function gemv<double>': C:/Users/elias/Documents/eclipseCPP_test2/dombs/include/armadillo_bits/blas_wrapper.hpp:34: undefined reference towrapper_dgemv_' src\DombsMain.o: In function asum<double>': C:/Users/elias/Documents/eclipseCPP_test2/dombs/include/armadillo_bits/blas_wrapper.hpp:239: undefined reference towrapper_dasum_' src\DombsMain.o: In function nrm2<double>': C:/Users/elias/Documents/eclipseCPP_test2/dombs/include/armadillo_bits/blas_wrapper.hpp:271: undefined reference towrapper_dnrm2_' src\DombsMain.o: In function getrf<double>': C:/Users/elias/Documents/eclipseCPP_test2/dombs/include/armadillo_bits/lapack_wrapper.hpp:37: undefined reference towrapper_dgetrf_' src\DombsMain.o: In function gesdd<double>': C:/Users/elias/Documents/eclipseCPP_test2/dombs/include/armadillo_bits/lapack_wrapper.hpp:583: undefined reference towrapper_dgesdd_' src\DombsMain.o: In function gesv<double>': C:/Users/elias/Documents/eclipseCPP_test2/dombs/include/armadillo_bits/lapack_wrapper.hpp:643: undefined reference towrapper_dgesv_' src\DombsMain.o: In function gels<double>': C:/Users/elias/Documents/eclipseCPP_test2/dombs/include/armadillo_bits/lapack_wrapper.hpp:677: undefined reference towrapper_dgels_' src\DombsMain.o: In function getri<double>': C:/Users/elias/Documents/eclipseCPP_test2/dombs/include/armadillo_bits/lapack_wrapper.hpp:71: undefined reference towrapper_dgetri_' src\DombsMain.o: In function gemm<double>': C:/Users/elias/Documents/eclipseCPP_test2/dombs/include/armadillo_bits/blas_wrapper.hpp:69: undefined reference towrapper_dgemm_' src\RotationMatrix.o: In function syrk<double>': C:/Users/elias/Documents/eclipseCPP_test2/dombs/include/armadillo_bits/blas_wrapper.hpp:104: undefined reference towrapper_dsyrk_' src\RotationMatrix.o: In function dot<double>': C:/Users/elias/Documents/eclipseCPP_test2/dombs/include/armadillo_bits/blas_wrapper.hpp:183: undefined reference towrapper_ddot_' collect2.exe: error: ld returned 1 exit status

What could be causing this?

Edit

I made a new project and tried this code, and I get the same error. The code

arma::mat mm, mm2;
mm <<1<<1<<1;
mm2 <<1<<1<<1;
arma::mat mm3 = mm.t() * mm2;
mm3.print("h");

So it complains about the matrix multiplication.

lijas
  • 466
  • 1
  • 6
  • 17
  • 1
    Are you sure you're linking against armadillo itself? – Christian Blume Oct 28 '15 at 14:52
  • @ChristianBlume I am new to c++, so I dont really know what linking really does. How do i "link to armadillo itself"? – lijas Oct 28 '15 at 15:19
  • Did you link Armadillo properly? Have a look at this website http://stackoverflow.com/questions/30494610/how-to-link-armadillo-with-eclipse –  Oct 28 '15 at 18:56
  • @kass I seem to have the same problem as the guy you linked to. Unfortunately they did not seem to solve the problem. I have told eclipse where to find the lib and include folder, but I get the error as in my post. The answers to the post you linked to talks about .so files, but I dont have any .so files, and I dont know what they do. – lijas Oct 28 '15 at 19:30

0 Answers0