not linking with roscpp
Getting linking errors on everything in roscpp, serialization, console, etc. CMakelist looks correct (have read and tried all recommend postings. Can also compile other parts of the package that link with roscpp.). The failure occurs on with this library. Type of errors are like: undefined reference to
ros::console::initialize()'` for example.
This is the cmakelist.txt, and it references roscpp, and also catkin_LIBRARIES has the correct capitalization...everything seems as it should be. Apologies for the formatting, used "code block" but it doesn't stick.
cmake_minimum_required(VERSION 2.8.3)
project(imu_complementary_filter)
find_package(catkin REQUIRED COMPONENTS
cmake_modules
message_filters
roscpp
sensor_msgs
std_msgs
tf
genmsg
)
find_package(Eigen REQUIRED COMPONENTS)
catkin_package(
DEPENDS Eigen
INCLUDE_DIRS include
LIBRARIES complementary_filter
CATKIN_DEPENDS message_filters roscpp sensor_msgs std_msgs tf
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${Eigen_INCLUDE_DIRS}
)
add_library(complementary_filter
src/complementary_filter.cpp
src/complementary_filter_ros.cpp
include/imu_complementary_filter/complementary_filter.h
include/imu_complementary_filter/complementary_filter_ros.h
)
add_executable(complementary_filter_node
src/complementary_filter_node.cpp)
target_link_libraries(complementary_filter_node complementary_filter ${catkin_LIBRARIES} ${Eigen_LIBRARIES})
install(TARGETS complementary_filter complementary_filter_node
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)