Error in static member function instantiated from ...
Hi there !
I don't really find a title to my question, but when I try to compile the package I get the folowing errors, I don't know exactly the problem:
Building CXX object columbot/CMakeFiles/MainController.dir/src/MainController.cpp.o
In file included from /opt/ros/hydro/include/ros/service_client.h:33:0,
from /opt/ros/hydro/include/ros/node_handle.h:35,
from /opt/ros/hydro/include/ros/ros.h:45,
from /home/ros/catkin_ws/src/columbot/src/MainController.cpp:8:
/opt/ros/hydro/include/ros/service_traits.h: In static member function ‘static const char* ros::service_traits::MD5Sum<M>::value(const M&) [with M = staubli::command]’:
/opt/ros/hydro/include/ros/service_traits.h:97:104: instantiated from ‘const char* ros::service_traits::md5sum(const M&) [with M = staubli::command]’
/opt/ros/hydro/include/ros/service_client.h:90:71: instantiated from ‘bool ros::ServiceClient::call(Service&) [with Service = staubli::command]’
/home/ros/catkin_ws/src/columbot/src/MainController.cpp:21:30: instantiated from here
/opt/ros/hydro/include/ros/service_traits.h:52:40: error: ‘const struct staubli::command’ has no member named ‘__getServerMD5Sum’
/opt/ros/hydro/include/ros/service_traits.h: In static member function ‘static const char* ros::service_traits::MD5Sum<M>::value() [with M = staubli::command]’:
/opt/ros/hydro/include/ros/service_traits.h:79:103: instantiated from ‘const char* ros::service_traits::md5sum() [with M = staubli::command]’
/opt/ros/hydro/include/ros/service_client_options.h:94:5: instantiated from ‘void ros::ServiceClientOptions::init(const string&, bool, const M_string&) [with Service = staubli::command, std::string = std::basic_string<char>, ros::M_string = std::map<std::basic_string<char>, std::basic_string<char> >]’
/opt/ros/hydro/include/ros/node_handle.h:1153:5: instantiated from ‘ros::ServiceClient ros::NodeHandle::serviceClient(const string&, bool, const M_string&) [with Service = staubli::command, std::string = std::basic_string<char>, ros::M_string = std::map<std::basic_string<char>, std::basic_string<char> >]’
/home/ros/catkin_ws/src/columbot/src/MainController.cpp:176:74: instantiated from here
/opt/ros/hydro/include/ros/service_traits.h:47:43: error: ‘__s_getServerMD5Sum’ is not a member of ‘staubli::command’
make[2]: *** [columbot/CMakeFiles/MainController.dir/src/MainController.cpp.o] Error 1
make[1]: *** [columbot/CMakeFiles/MainController.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
And these are the concerning files:
Package 1: staubli CMakeLists:
cmake_minimum_required(VERSION 2.8.3) project(staubli)
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs )
include_directories( ${catkin_INCLUDE_DIRS} )
link_directories( /home/jros/catkin_ws/devel/lib/ ${catkin_LIBRARY_DIRS} )
add_library(soapC src/soapC.cpp) add_library(Server0 src/soapCS8ServerV0Proxy.cpp) add_library(Server1 src/soapCS8ServerV1Proxy.cpp) add_library(Server3 src/soapCS8ServerV3Proxy.cpp) add_library(stdsoap2 src/stdsoap2.cpp) add_library(tx60l src/TX60L.cpp)
add_executable(staubli_controller src/controller.cpp) target_link_libraries(staubli_controller ${catkin_LIBRARIES})
target_link_libraries(staubli_controller ${catkin_LIBRARIES} Server0 Server1 Server3 soapC stdsoap2 tx60l)
target_link_libraries(staubli_controller soapC) target_link_libraries(staubli_controller Server0) target_link_libraries(staubli_controller Server1) target_link_libraries(staubli_controller Server3) target_link_libraries(staubli_controller stdsoap2) target_link_libraries(staubli_controller tx60l)
Package 2: columbot CMakeLists:
cmake_minimum_required(VERSION 2.8.3)
project(columbot)
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs staubli)
include_directories( ${catkin_INCLUDE_DIRS} )
add_executable(MainController src/MainController.cpp)
target_link_libraries(MainController ${catkin_LIBRARIES})
I'm using ROS-Hydro in ...
could you add your CMakeFile please ?
@Maya I just update my question
I think it would be helpful if you didn't use a screenshot to show the error. Just copy/paste the console output, and format it properly using the
101010
button while editing your question.OK @gvdhoorn I did
You can probably coalesce all source files into a single library (with the exception of your main node), and then use a single
target_link_libraries(..)
, instead of the many -- single file -- libraries you have now.