[openrtm-users 03066] Re: (無題)

attila.bernath @ sztaki.hu attila.bernath @ sztaki.hu
2014年 7月 18日 (金) 05:07:26 JST


Dear Geoff, I use cmake. The OpenRTM is of version 1.1. Contents of the file
bad_test_RTMHexConverter.cpp: #include #include #include #include int
main(int argc, char **argv) { RTC::TimedString data; RTC::TimedString data2;
// commenting out the next line results in a segfault RTC::InPort("hi",
data2); std::cout << data.data << std::endl; cdrMemoryStream os; std::cerr <<
"Hi" << std::endl; data >>= os; std::cerr << "Hi2" << std::endl; } Contents
of the CMakeLists.txt file: cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(cdrStreamProba) set(CMAKE_BUILD_TYPE Debug) find_package(OpenRTM)
if(${OpenRTM_FOUND}) MESSAGE(STATUS "OpenRTM configuration Found")
else(${OpenRTM_FOUND}) message(STATUS "Use cmake/Modules/FindOpenRTM.cmake in
the project") list(APPEND CMAKE_MODULE_PATH
${PROJECT_SOURCE_DIR}/cmake/Modules) find_package(OpenRTM REQUIRED)
endif(${OpenRTM_FOUND}) if (DEFINED OPENRTM_INCLUDE_DIRS) string(REGEX
REPLACE "-I" ";" OPENRTM_INCLUDE_DIRS "${OPENRTM_INCLUDE_DIRS}") string(REGEX
REPLACE " ;" ";" OPENRTM_INCLUDE_DIRS "${OPENRTM_INCLUDE_DIRS}") endif
(DEFINED OPENRTM_INCLUDE_DIRS) include_directories(${OPENRTM_INCLUDE_DIRS})
message("omniorb" ${OMNIORB_INCLUDE_DIRS})
add_executable(bad_test_RTMHexConverter bad_test_RTMHexConverter.cpp)
target_link_libraries(bad_test_RTMHexConverter ${OPENRTM_LIBRARIES}) Attila



More information about the openrtm-users mailing list