rpng / pointgrey_ladybug

ROS Driver for Pointgrey Ladybug Cameras
Other
29 stars 7 forks source link

"/usr/bin/ld: cannot find -lladybug" error when compiling #1

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hi, I am trying to use these drivers on a Ladybug 5 camera. I am following the instructions and installed the current version of the ladybug sdk (ver 1.16.3.48). When I try to run catkin_make, I see the following error:

[100%] Linking CXX executable /home/USERXXX/apps/ladybug_ws/devel/lib/pointgrey_ladybug/ladybug_camera
/usr/bin/ld: cannot find -lflycapture
/usr/bin/ld: cannot find -lladybug
collect2: error: ld returned 1 exit status
pointgrey_ladybug/CMakeFiles/ladybug_camera.dir/build.make:167: recipe for target '/home/vik748/apps/ladybug_ws/devel/lib/pointgrey_ladybug/ladybug_camera' failed
make[2]: *** [/home/vik748/apps/ladybug_ws/devel/lib/pointgrey_ladybug/ladybug_camera] Error 1
CMakeFiles/Makefile2:489: recipe for target 'pointgrey_ladybug/CMakeFiles/ladybug_camera.dir/all' failed
make[1]: *** [pointgrey_ladybug/CMakeFiles/ladybug_camera.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

I have tried this on 2 different machines and it consistent. Have you seen this error before or have any ideas on how to address it?

Thanks, Vik

vik748 commented 5 years ago

It looks like the current version of the ladybug sdk library installs in /usr/lib/ladybug instead of /usr/lib. I as able to fix the issue by adding the following line to CMakeLists.txt before the add_executable(ladybug_camera line:

link_directories(/usr/lib/ladybug)