undefined reference to symbol 'vtable for boost::detail::thread_data_base'
hi all,
I am trying to build macros to add executable.
I create my package and add this rosbuild_add_executable(mytele_keyboard src/turtlebot_key.cpp)
in CMakeLists.txt
then When do rosmake my package I get 1 failure !! I am now try to understand what is wrong
amal@amal-HP-G62-Notebook-PC:/opt/ros/fuerte/stacks/turtlebot_apps/turtlebot_teleop/src$ rosmake mytele
[ rosmake ] rosmake starting...
[ rosmake ] Packages requested are: ['mytele']
[ rosmake ] Logging to directory /home/amal/.ros/rosmake/rosmake_output-20121210-031624
[ rosmake ] Expanded args ['mytele'] to:
['mytele']
[rosmake-0] Starting >>> geometry_msgs [ make ]
[rosmake-1] Starting >>> roslang [ make ]
[rosmake-0] Finished <<< geometry_msgs No Makefile in package geometry_msgs
[rosmake-1] Finished <<< roslang No Makefile in package roslang
[rosmake-1] Starting >>> rospy [ make ]
[rosmake-3] Starting >>> roscpp [ make ]
[rosmake-1] Finished <<< rospy No Makefile in package rospy
[rosmake-3] Finished <<< roscpp No Makefile in package roscpp
[rosmake-3] Starting >>> mytele [ make ]
[ rosmake ] Last 40 linestele: 0.8 sec ] [ 1 Active 4/5 Complete ]
{-------------------------------------------------------------------------------
mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake ..
[rosbuild] Building package mytele
[rosbuild] Including /opt/ros/fuerte/share/roscpp/rosbuild/roscpp.cmake
[rosbuild] Including /opt/ros/fuerte/share/rospy/rosbuild/rospy.cmake
[rosbuild] Including /opt/ros/fuerte/stacks/client_rosjava_jni/rosjava_jni/cmake/rosjava.cmake
[rosbuild] Including /opt/ros/fuerte/share/roslisp/rosbuild/roslisp.cmake
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_TOOLCHAIN_FILE
-- Build files have been written to: /home/amal/ros/sandbox/turtlebot_sim/mytele/build
cd build && make -l4
make[1]: Entering directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
make[2]: Entering directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
make[3]: Entering directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
make[3]: Leaving directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
[ 0%] Built target rospack_genmsg_libexe
make[3]: Entering directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
make[3]: Leaving directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
[ 0%] Built target rosbuild_precompile
make[3]: Entering directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
make[3]: Leaving directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
make[3]: Entering directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
Linking CXX executable ../bin/mytele_keyboard
/usr/bin/ld: CMakeFiles/mytele_keyboard.dir/src/turtlebot_key.o: undefined reference to symbol 'vtable for boost::detail::thread_data_base'
/usr/bin/ld: note: 'vtable for boost::detail::thread_data_base' is defined in DSO /usr/lib/libboost_thread.so.1.46.1 so try adding it to the linker command line
/usr/lib/libboost_thread.so.1.46.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[3]: *** [../bin/mytele_keyboard] Error 1
make[3]: Leaving directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
make[2]: *** [CMakeFiles/mytele_keyboard.dir/all] Error 2
make[2]: Leaving directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/amal/ros/sandbox/turtlebot_sim/mytele/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package mytele written to:
[ rosmake ] /home/amal/.ros/rosmake/rosmake_output-20121210-031624/mytele/build_output.log
[rosmake-3] Finished <<< mytele [FAIL] [ 0.89 seconds ]
[ rosmake ] Halting due to failure in package mytele.
[ rosmake ] Waiting for other ...