catkin_make hector_costmap with undefined reference Error [closed]

asked 2015-07-18 09:05:52 -0500

wsAndy gravatar image

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!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by wsAndy
close date 2015-08-07 21:25:24.226416

Comments

1

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.

William gravatar image William  ( 2015-07-20 17:43:07 -0500 )edit

Thanks for your answer ! I know that this problem is caused by opencv. Now I can catkin_make hector_costmap by opencv2

wsAndy gravatar image wsAndy  ( 2015-08-05 04:02:04 -0500 )edit