今天跟着视觉slam十四讲写了第六章ceres部分的代码 发现编译的时候报错
先附上我的CMakeLists
cmake_minimum_required(VERSION 2.8)
project(ceres)
set( CMAKE_CXX_FLAGS "-std=c++11 -O3" )
find_package(OpenCV REQUIRED)
find_package(Ceres REQUIRED)
include_directories( ${OpenCV_INCLUDE_DIRS} ${Ceres_INCLUDE_DIRS})
add_executable(ceres_curve ceres_curve_fitting.cpp)
target_link_libraries(ceres_curve ${OpenCV_LIBRARIES} ${Ceres_LIBRARIES})
这是报错信息
CMakeFiles/ceres_curve.dir/ceres_curve_fitting.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)':
/usr/include/glog/logging.h:669: undefined reference to `google::base::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)'
/usr/include/glog/logging.h:671: undefined reference to `google::base::CheckOpMessageBuilder::ForVar2()'