error while loading shared libraries
I want to use shared objects as libraries. The .so files of them are at my disposal.
I created a catkin_package. That package contains a source, include and lib folder (where I put the .so files)
My CMakeLists.txt of the package is the following:
cmake_minimum_required(VERSION 2.8.3)
project(yocto3d)
find_package(catkin REQUIRED COMPONENTS)
catkin_package()
include_directories(include ${catkin_INCLUDE_DIRS})
add_executable(yocto3d src/main.cpp)
target_link_libraries(yocto3d ${catkin_LIBRARIES} ${PROJECT_SOURCE_DIR}/lib/libyapi.so.1.0.1 ${PROJECT_SOURCE_DIR}/lib/libyocto.so.1.0.1)
Everything compiles without warnings and errors, but when I run
rosrun yocto3d yocto3d
I get the following error (can't find the libraries)
/home/dh/catkin_ws/devel/lib/yocto3d/yocto3d: error while loading shared libraries: libyocto.so.1.0.1: cannot open shared object file: No such file or directory
What am I missing?