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

After some hours of trying I just read the following page for the third time:

https://answers.ros.org/question/203315/shared-libraries-with-catkin/

And realised I didn't add /lib to my include_directories.

Old include_directories:

include_directories(include ${catkin_INCLUDE_DIRS})

Fix the error by changing the line into

include_directories(include ${catkin_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/lib)

Unfortunately I am not allowed to mark my own answer as correct.

After some hours of trying I just read the following page for the third time:

https://answers.ros.org/question/203315/shared-libraries-with-catkin/

And realised I didn't add /lib to my include_directories.

Old include_directories:

include_directories(include ${catkin_INCLUDE_DIRS})

Fix the error by changing the line into

include_directories(include ${catkin_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/lib)

Unfortunately I am not allowed to mark my own answer as correct.

After some hours of trying I just read the following page for the third time:

time: https://answers.ros.org/question/203315/shared-libraries-with-catkin/

And realised I didn't add /lib to my include_directories.

Old include_directories. So I added that to my include_directories:

include_directories(include ${catkin_INCLUDE_DIRS})

Fix the error by changing the line into

include_directories(include ${catkin_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/lib)

I also copied the two libraries (.so files) to /usr/lib. When running the program the files in this folder will be used, when compiling with catkin_make the files in catkin_ws/src/yocto3d/lib will be used.

In conclusion: the paths to the libraries are different when compiling and when running the program.

After some hours of trying I just read the following page for the third time: https://answers.ros.org/question/203315/shared-libraries-with-catkin/

And realised I didn't add /lib to my include_directories. So I added that to my include_directories:

include_directories(include ${catkin_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/lib)

I also copied the two libraries (.so files) to /usr/lib. When running the program the files in this folder will be used, when compiling with catkin_make the files in catkin_ws/src/yocto3d/lib will be used.

In conclusion: the paths to the libraries are different when compiling and when running the program.