catkin_make error
hi, i am a beginner of learning ROS.
I write a node of image processing with Halcon library.
As far as I know, it should be configured well, in CMakeList.txt
, to make the node pass the compile.
The following is my CMakeLists.txt
:
cmake_minimum_required(VERSION 2.8.3)
project(daheng_try_cmdvel)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
tf
)
generate_messages( DEPENDENCIES std_msgs )
catkin_package()
include_directories(
${catkin_INCLUDE_DIRS}
/home/zcn/Downloads/daheng-1.3.1305.9271-32/sdk/include
/home/zcn/Downloads/daheng-1.3.1305.9271-32/sdk/genicam/library/CPP/include
/home/zcn/Downloads/halcon-7.0.4-linux-x86/include
/home/zcn/Downloads/halcon-7.0.4-linux-x86/include/cpp
)
link_directories(
/usr/lib/
/home/zcn/Downloads/daheng-1.3.1305.9271-32/sdk/genicam/bin/Linux32_i86/
/home/zcn/Downloads/daheng-1.3.1305.9271-32/sdk/genicam/bin/Linux32_i86/GenApi/Generic/
/home/zcn/Downloads/halcon-7.0.4-linux-x86/lib/i586-linux2.2
)
add_executable(daheng_try_cmdvel_node src/daheng_try_cmdvel_node.cpp)
target_link_libraries(daheng_try_cmdvel_node
${catkin_LIBRARIES}
gxiapi
pthread
dhgentl
GCBase_gcc40_v2_3
GenApi_gcc40_v2_3
log4cpp_gcc40_v2_3
Log_gcc40_v2_3
MathParser_gcc40_v2_3
Xalan-C_gcc40_v1_10
XalanMessages_gcc40_v1_10
Xerces-C_gcc40_v2_7
XMLLoader_gcc40_v2_3
halconcpp
)
add_dependencies(daheng_try_cmdvel_node daheng_try_cmdvel_generate_messages_cpp)
But, when I catkin_make, it shows:
CMakeFiles/daheng_try_cmdvel_node.dir/src/daheng_try_cmdvel_node.cpp.o: In function `__static_initialization_and_destruction_0(int, int)':
daheng_try_cmdvel_node.cpp:(.text+0x772): undefined reference to `HTuple::HTuple()'
CMakeFiles/daheng_try_cmdvel_node.dir/src/daheng_try_cmdvel_node.cpp.o: In function `HTuple::~HTuple()':
daheng_try_cmdvel_node.cpp:(.text._ZN6HTupleD2Ev[_ZN6HTupleD5Ev]+0xc): undefined reference to `vtable for HTuple'
collect2: ld return 1
make[2]: *** [/home/zcn/catkin_ws/devel/lib/daheng_try_cmdvel/daheng_try_cmdvel_node] error 1
make[1]: *** [daheng_try_cmdvel/CMakeFiles/daheng_try_cmdvel_node.dir/all] error 2
make: *** [all] error 2
Invoking "make" failed
why?