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

It is very recommendable to have a second workspace to just build this package and I nailed it.
My exported library was the problem. So I commented it but the WHY is still unsolved?

CMake Error at test_my_env/CMakeLists.txt:61 (target_link_libraries):
  Attempt to add link library "/opt/ros/jade/lib/libroscpp.so" to target
  "add_two_ints_server" which is not built in this directory.


## build your library, listing all required C++ source files(no headers)
#set(MY_TEST_LIB_SRC
#   src/talker.cpp 
#   src/listener.cpp 
#   src/add_two_ints_server.cpp 
#   src/add_two_ints_client.cpp)

## my library export
#add_library(my_test_lib ${MY_TEST_LIB_SRC})

## my library depends on
#target_link_libraries(my_test_lib
#                       ${catkin_LIBRARIES} #catkin libraries
#                       ${Boost_LIBRARIES}) #additional non catkin libraries
#add_dependencies(my_test_lib ${catkin_EXPORTED_TARGETS})

## Libraries are installed in a lib/ directory shared by all packages in entire ROS distro
#install(TARGETS my_test_lib
#        ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#        LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
#        RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})