Closed ymohamed08 closed 4 years ago
Undefined reference means it cannot find specific functions in so files. Check opencv version and boost version. I followed this file instead of wiki. It works at my end.
If i change the version in the CMakeLists.txt
into find_package(OpenCV 4.1 REQUIRED)
the cv error goes away but for boost, i have version 1.65.1 and it still gives me the same error
/home/joe/catkin_ws/devel/lib/libcv_bridge.so: undefined reference to `boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match()'
/home/joe/catkin_ws/devel/lib/libcv_bridge.so: undefined reference to `boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, 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)'
collect2: error: ld returned 1 exit status
openface_ros/CMakeFiles/openface_realsense.dir/build.make:211: recipe for target '/home/joe/catkin_ws/devel/lib/openface_ros/openface_realsense' failed
make[2]: *** [/home/joe/catkin_ws/devel/lib/openface_ros/openface_realsense] Error 1
CMakeFiles/Makefile2:2654: recipe for target 'openface_ros/CMakeFiles/openface_realsense.dir/all' failed
make[1]: *** [openface_ros/CMakeFiles/openface_realsense.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
it seems the ${Boost_LIBARAY}
doesn't contain some functions. I didn't encounter this kind of errors before but I found some related threads might be worth trying
Hi @youssef266 Have you found any solution ? I have the same error !
These two are different? I think yours is because you don't have libboost.
Thank you ..my problem of linking is amounts to order of installation of opencv and openface ...so you can follow this file to fix this error
I have followed the instructions for installing openface on the wiki and it is working fine, however, when i try and compile the wrapper using
catkin_make
i get the following linking errori am using ubuntu 18.04 ROS melodic g++ 8