ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Crisliu7's profile - activity

2020-07-23 05:59:15 -0500 received badge  Famous Question (source)
2020-07-23 05:59:15 -0500 received badge  Notable Question (source)
2020-01-03 10:49:39 -0500 received badge  Famous Question (source)
2020-01-03 10:49:39 -0500 received badge  Notable Question (source)
2020-01-03 10:49:39 -0500 received badge  Popular Question (source)
2019-03-01 16:31:51 -0500 marked best answer How to copy .so file from src to devel when catkin_make?

I have an external .so library to link. If I put it only in src/lib/ and try to find_library() it, the catkin_make always fail. But if I manually put the .so file in devel/lib/, it works. Is there any way that I can automatically copy the .so file from src/lib/ to devel/lib/ ?

Here is a confusing thing. When I output the ${PROJECT_SOURCE_DIR}, it is the src folder, but when I use this address to find_library, it will be directed to devel folder. But I didn't put .so file in devel/lib/.

My code in CMakeLists.txt:

message("PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}")
find_library(DYNAMSOFT_LIBRARY 
  NAMES libDynamsoftBarcodeReader.so 
  PATHS ${PROJECT_SOURCE_DIR}/lib/)
message("DYNAMSOFT_LIBRARY: ${DYNAMSOFT_LIBRARY}")

Corresponding output in terminal:

PROJECT_SOURCE_DIR: /home/zhiyang/mfp_workspace/src/srsnode_barcode_reader
DYNAMSOFT_LIBRARY: /home/zhiyang/mfp_workspace/devel/lib/libDynamsoftBarcodeReader.so
2018-08-24 14:36:18 -0500 asked a question focus setting in usb_cam

focus setting in usb_cam When I try to use usb_cam to control uvc camera, setting the "focus" parameter in the launch fi

2018-08-22 02:33:17 -0500 received badge  Popular Question (source)
2018-08-21 15:38:13 -0500 asked a question How to copy .so file from src to devel when catkin_make?

How to copy .so file from src to devel when catkin_make? I have an external .so library to link. If I put it only in src