[CMake] Eclipse project and MKL libraries

Giovanni Azua bravegag at gmail.com
Fri Apr 27 16:02:18 EDT 2012


Hello,

I generate an Eclipse project from cmake using the command (I made the build directory sibling of my code directory):
cmake -G "Eclipse CDT4 - Unix Makefiles" ../code

I'm unable to run or debug the different targets from Eclipse. I get the following linking error, even though it compiles and executes just fine from command line:

Linking CXX executable benchmark
/usr/bin/cmake -E cmake_link_script CMakeFiles/benchmark.dir/link.txt --verbose=1
/usr/bin/c++    -Wall -Wextra -Wshadow -Woverloaded-virtual  -g3 -ggdb3    CMakeFiles/benchmark.dir/test/benchmark.cc.o  -o benchmark -rdynamic libxxxxx.a libxxx_func_fw.a libqr_updates.a -lrt -lmkl_rt -liomp5 -limf -lgfortran -lquadmath 
/usr/bin/ld: cannot find -lmkl_rt
/usr/bin/ld: cannot find -liomp5
/usr/bin/ld: cannot find -limf
collect2: ld returned 1 exit status
make[2]: Leaving directory `/home/bravegag/code/fastcode_project/build'
make[1]: Leaving directory `/home/bravegag/code/fastcode_project/build'
make[2]: *** [benchmark] Error 1
make[1]: *** [CMakeFiles/benchmark.dir/all] Error 2
make: *** [all] Error 2

I'm using the latest Eclipse C++ Indigo from the download page and working on Ubuntu 12.04 though I have the same problem in Mac OS X.

TIA,
Best regards,
Giovanni


More information about the CMake mailing list