ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After some googling, I found this. I think I can now answer the problem myself: It turned out that I need to place link_directories(/usr/xenomai/lib) before rosbuild_add_executable(listener src/listener.cpp), that is,

link_directories(/usr/xenomai/lib)
rosbuild_add_executable(listener src/listener.cpp)
include_directories(/usr/xenomai/include)
add_definitions(-D_GNU_SOURCE -D_REENTRANT -D__XENO__)
rosbuild_add_compile_flags(listener -Wall -pipe)
target_link_libraries(listener native xenomai pthread rtdk)

Is this a bug, or a restriction of CMake? Is it documented somewhere?