Hi to all, I'm a ros user and I try to run the example with mix of log4cpp and OCL::logging implementations.
I create an eclipse project and I have many problem.. The first:
/opt/ros/electric/stacks/locomachs/testlogging.cpp:40: undefined reference to `OCL::logging::Category::createOCLCategory(std::basic_string<char, std::char_traits for the line I use Ros electric, and this is my CMakeList cmake_minimum_required(VERSION 2.6.3) if (ROS_ROOT) # find_package(OROCOS-RTT REQUIRED ${RTT_HINTS}) # Set the CMAKE_PREFIX_PATH in case you're not using Orocos through ROS # Defines the orocos_* cmake macros. See that file for additional orocos_component(locomachs locomachs-component.hpp locomachs-component.cpp) orocos_component(orocos-logging-tests TestComponent.cpp TestLoggingAvailability.cpp ) target_link_libraries(orocos-logging-tests orocos-ocl-logging log4cpp) orocos_component(testlogging testlogging.cpp) target_link_libraries(testlogging orocos-ocl-logging) # Creates an orocos executable HelloWorld orocos_generate_package() EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ##################################### any ideas?
// use only OCL::logging Category's log4cpp::HierarchyMaintainer::set_category_factory(OCL::logging::Category::createOCLCategory);
project(locomachs)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
rosbuild_find_ros_package( rtt )
set( RTT_HINTS HINTS ${rtt_PACKAGE_PATH}/install )
endif()
rosbuild_find_ros_package(rtt )
rosbuild_find_ros_package(ocl)
rosbuild_find_ros_package(ocl/logging)
#
INCLUDE_DIRECTORIES( ${LOG4CPP_INCLUDE_DIRS} )
LINK_DIRECTORIES( ${LOG4CPP_LIBRARY_DIRS} )
include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)
# for helping these find commands find RTT.
find_package(OROCOS-RTT REQUIRED ${RTT_HINTS})
# documentation.
include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)
orocos_use_package(ocl-taskbrowser)
orocos_executable(Data DataFlowTask.cpp)
orocos_executable(Data2 testlogging.cpp)
${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data)