catkin_make hector_costmap with undefined reference Error [closed]
Hello , I run indigo in Ubuntu14.04 LTS. When I catkin_make it , I get some problems.
CMakeFiles/hector_costmap.dir/src/hector_costmap.cpp.o: In function `cv::String::String(char const*)':
hector_costmap.cpp:(.text._ZN2cv6StringC2EPKc[_ZN2cv6StringC5EPKc]+0x3d): undefined reference to `cv::String::allocate(unsigned int)'
CMakeFiles/hector_costmap.dir/src/hector_costmap.cpp.o: In function `cv::String::~String()':
hector_costmap.cpp:(.text._ZN2cv6StringD2Ev[_ZN2cv6StringD5Ev]+0xd): undefined reference to `cv::String::deallocate()'
CMakeFiles/hector_costmap.dir/src/hector_costmap.cpp.o: In function `cv::Mat::Mat(int, int, int, void*, unsigned int)':
hector_costmap.cpp:(.text._ZN2cv3MatC2EiiiPvj[_ZN2cv3MatC5EiiiPvj]+0x17b): undefined reference to `cv::error(int, cv::String const&, char const*, char const*, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/exbot/hector/devel/lib/hector_costmap/hector_costmap] Error 1
make[1]: *** [hector_navigation/hector_costmap/CMakeFiles/hector_costmap.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
My opencv is 3.0.0beta. I wonder if this is the problem.
Thanks first!
You should try it with the opencv that ROS Indigo normally uses on Trusty and I bet the issue goes away. You'll probably have to update
hector_costmap
to use OpenCV3 if you want to do what you're doing.Thanks for your answer ! I know that this problem is caused by opencv. Now I can catkin_make hector_costmap by opencv2