「caffe编译bug」 undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11

CXX/LD -o .build_release/tools/test_net.bin
CXX/LD -o .build_release/tools/convert_annoset.bin
CXX/LD -o .build_release/tools/device_query.bin
CXX/LD -o .build_release/tools/extract_features.bin
CXX/LD -o .build_release/tools/get_image_size.bin
CXX/LD -o .build_release/tools/create_label_map.bin
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
CXX/LD -o .build_release/tools/compute_image_mean.bin
CXX/LD -o .build_release/tools/train_net.bin
CXX/LD -o .build_release/tools/convert_imageset.bin
.build_release/lib/libcaffe.so: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > const&)'
.build_release/lib/libcaffe.so: undefined reference to `cv::VideoCapture::set(int, double)'
.build_release/lib/libcaffe.so: undefined reference to `boost::re_detail::raise_runtime_error(std::runtime_error const&)'
.build_release/lib/libcaffe.so: undefined reference to `cv::VideoCapture::open(int)'
.build_release/lib/libcaffe.so: undefined reference to `boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const'
.build_release/lib/libcaffe.so: undefined reference to `boost::re_detail::put_mem_block(void*)'
.build_release/lib/libcaffe.so: undefined reference to `cv::VideoWriter::write(cv::Mat const&)'
.build_release/lib/libcaffe.so: undefined reference to `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
.build_release/lib/libcaffe.so: undefined reference to `boost::re_detail::get_mem_block()'

上面错误是 undefined reference没有将regex填入LIBRARIES 中
修改LIBRARIES ,将boost_regex加入进去
# We will also explicitly add stdc++ to the link target.
LIBRARIES +=  boost_regex boost_atomic boost_thread stdc++

posted @ 2018-11-19 14:26  HOU_JUN  阅读(2510)  评论(0编辑  收藏  举报