6 Replies Latest reply on Oct 31, 2015 12:33 AM by pratapbhanusolanki

    Adding Armadillo to Eclipse for Intel Edison



      I am using Eclipse to compile and run codes on my Intel Edison and this might be Eclipse specific question so forgive me if this is not the right place for it. I was trying to install Armadillo linear algebra library and link it to Eclipse and I ran into problems during compiling the code. I downloaded the Armadillo files from Armadillo: C++ linear algebra library . I added the include folder of Armadillo to the Eclipse (Project Name(Right Click)->properties->C/C++ Build->Settings->Cross G++ Compiler->Includes->Include paths(-I) )and I also added the Armadillo library folder (containing lapack and blas prebuilt .lib and .dll files) to the Eclipse (Project Name(Right Click)->properties->C/C++ Build->Settings->Cross G++ Linker->Libraries->Libraries(-l) ) . However when I compile my code I get the following error


      18:56:22 **** Incremental Build of configuration Debug for project exampleSPI ****
      Info: Internal Builder is used for build
      i586-poky-linux-g++ "-LC:\\Intel\\iotdk-ide-win\\ArmadilloLibraries\\lib_win64" "--sysroot=C:\\Intel\\iotdk-ide-win\\devkit-x86\\sysroots\\i586-poky-linux" -lmraa -o exampleSPI "src\\exampleSPI.o" "src\\ADIS16485.o" 
      src\exampleSPI.o: In function `void arma::lapack::getrf<double>(int*, int*, double*, int*, int*, int*)':
      C:/Intel/iotdk-ide-win/ArmadilloIncludes/armadillo_bits/lapack_wrapper.hpp:37: undefined reference to `dgetrf_'
      collect2.exe: error: ld returned 1 exit status
      18:56:22 Build Finished (took 214ms)


      It seems that the Eclipse is unable to link to libraries. Is it because I am using IoT cross GCC ? Any suggestions will be very helpful. Thank you.