I am running sample programs in g2o graph library in linux using cmake. I am getting the following error. The file i am running has the following code
#include <Eigen/Core> which is causing the error.
[ 3%] Building CXX object data_fitting/CMakeFiles/circle_fit.dir/circle_fit.o g2o/trunk/g2o/examples/data_fitting/circle_fit.cpp:27:2 3: fatal error: Eigen/Core: No such file or directory compilation terminated. make[2]: *** [data_fitting/CMakeFiles/circle_fit.dir/circle_fit.o] Error 1 make[1]: *** [data_fitting/CMakeFiles/circle_fit.dir/all] Error 2 I am new to using cmake. Is this because of an error in the CMakeLists.txt file?
INCLUDE_DIRECTORIES(${CSPARSE_INCLUDE_DIR}) ADD_EXECUTABLE(circle_fit circle_fit.cpp ) SET_TARGET_PROPERTIES(circle_fit PROPERTIES OUTPUT_NAME circle_fit${EXE_POSTFIX}) TARGET_LINK_LIBRARIES(circle_fit core solver_csparse) ADD_EXECUTABLE(curve_fit curve_fit.cpp ) SET_TARGET_PROPERTIES(curve_fit PROPERTIES OUTPUT_NAME curve_fit${EXE_POSTFIX}) TARGET_LINK_LIBRARIES(curve_fit core) I am struggling with this for a day now. The tutorials available for cmake are also not helping much. How can I fix this error?
I tried adding include statement for /usr/include/eigen3 as the first answer suggested. But I cannot find any file named eigen3 in the /usr/include directory.
Is there any other possible path? How can I find it in linux?