Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ROS OpenCV linker error

I am trying to compile a program I have that uses opencv, and I get the following error:

--> Making UTIL -- Linking popup.o to popup (C++) /usr/bin/ld: cannot find -l/usr/lib/libopencv_contrib.so.2.3.1 collect2: ld returned 1 exit status make[2]: * [popup] Error 1 make[1]: [binaries] Error 255 make: ** [all] Error 2

However, I do seem to have the necessary files:

/usr/lib$ ls -l

lrwxrwxrwx 1 root root 24 2011-11-13 09:20 libopencv_contrib.so -> libopencv_contrib.so.2.3

lrwxrwxrwx 1 root root 26 2011-11-13 09:20 libopencv_contrib.so.2.3 -> libopencv_contrib.so.2.3.1

-rw-r--r-- 1 root root 372344 2011-11-11 00:12 libopencv_contrib.so.2.3.1

I also have $LD_LIBRARY_PATH set as follows

$echo $LD_LIBRARY_PATH

/usr/lib

The library is being searched for because I am trying to link to opencv2, in which the manifest at /opt/ros/electric/stacks/vision_opencv/opencv2/manifest.xml has:

<\export> <\cpp cflags="pkg-config opencv-2.3.1 --cflags" lflags="pkg-config opencv-2.3.1 --libs"/>

And this command returns: $pkg-config opencv-2.3.1 --libs

-l/usr/lib/libopencv_contrib.so.2.3.1 -l/usr/lib/libopencv_legacy.so.2.3.1 -l/usr/lib/libopencv_objdetect.so.2.3.1 -l/usr/lib/libopencv_calib3d.so.2.3.1 -l/usr/lib/libopencv_features2d.so.2.3.1 -l/usr/lib/libopencv_video.so.2.3.1 -l/usr/lib/libopencv_highgui.so.2.3.1 -l/usr/lib/libopencv_ml.so.2.3.1 -l/usr/lib/libopencv_imgproc.so.2.3.1 -l/usr/lib/libopencv_flann.so.2.3.1 -l/usr/lib/libopencv_core.so.2.3.1

Any advice would be appreciated. If this is not the appropriate place to ask this question, I apologize, and please direct me to the appropriate place. Also, if I have not provided sufficient information or explained my question in enough detail, please let me know what additional information I can provide.

Thanks!

ROS OpenCV linker error

I am trying to compile a program I have that uses opencv, and I get the following error:

--> Making UTIL -- Linking popup.o to popup (C++) /usr/bin/ld: cannot find -l/usr/lib/libopencv_contrib.so.2.3.1 collect2: ld returned 1 exit status make[2]: * [popup] Error 1 make[1]: [binaries] Error 255 make: ** [all] Error 2

However, I do seem to have the necessary files:

/usr/lib$ ls -l

lrwxrwxrwx 1 root root 24 2011-11-13 09:20 libopencv_contrib.so -> libopencv_contrib.so.2.3

lrwxrwxrwx 1 root root 26 2011-11-13 09:20 libopencv_contrib.so.2.3 -> libopencv_contrib.so.2.3.1

-rw-r--r-- 1 root root 372344 2011-11-11 00:12 libopencv_contrib.so.2.3.1

I also have $LD_LIBRARY_PATH set as follows

$echo $LD_LIBRARY_PATH

/usr/lib

The library is being searched for because I am trying to link to opencv2, in which the manifest at /opt/ros/electric/stacks/vision_opencv/opencv2/manifest.xml has:

<\export> <\cpp cflags="pkg-config opencv-2.3.1 --cflags" lflags="pkg-config opencv-2.3.1 --libs"/>

And this command returns: $pkg-config opencv-2.3.1 --libs

-l/usr/lib/libopencv_contrib.so.2.3.1 -l/usr/lib/libopencv_legacy.so.2.3.1 -l/usr/lib/libopencv_objdetect.so.2.3.1 -l/usr/lib/libopencv_calib3d.so.2.3.1 -l/usr/lib/libopencv_features2d.so.2.3.1 -l/usr/lib/libopencv_video.so.2.3.1 -l/usr/lib/libopencv_highgui.so.2.3.1 -l/usr/lib/libopencv_ml.so.2.3.1 -l/usr/lib/libopencv_imgproc.so.2.3.1 -l/usr/lib/libopencv_flann.so.2.3.1 -l/usr/lib/libopencv_core.so.2.3.1

I am using Ubuntu 10.04.3 LTS (Lucid).

Any advice would be appreciated. If this is not the appropriate place to ask this question, I apologize, and please direct me to the appropriate place. Also, if I have not provided sufficient information or explained my question in enough detail, please let me know what additional information I can provide.

Thanks!

ROS OpenCV linker error

I am trying to compile a program I have that uses opencv, and I get the following error:

--> Making UTIL -- Linking popup.o to popup (C++) /usr/bin/ld: cannot find -l/usr/lib/libopencv_contrib.so.2.3.1 collect2: ld returned 1 exit status make[2]: * [popup] Error 1 make[1]: [binaries] Error 255 make: ** [all] Error 2

However, I do seem to have the necessary files:

/usr/lib$ ls -l

lrwxrwxrwx 1 root root 24 2011-11-13 09:20 libopencv_contrib.so -> libopencv_contrib.so.2.3

lrwxrwxrwx 1 root root 26 2011-11-13 09:20 libopencv_contrib.so.2.3 -> libopencv_contrib.so.2.3.1

-rw-r--r-- 1 root root 372344 2011-11-11 00:12 libopencv_contrib.so.2.3.1

I also have $LD_LIBRARY_PATH set as follows

$echo $LD_LIBRARY_PATH

/usr/lib

The library is being searched for because I am trying to link to opencv2, in which the manifest at /opt/ros/electric/stacks/vision_opencv/opencv2/manifest.xml has:

<\export> <\cpp cflags="pkg-config opencv-2.3.1 --cflags" lflags="pkg-config opencv-2.3.1 --libs"/>

And this command returns: $pkg-config opencv-2.3.1 --libs

-l/usr/lib/libopencv_contrib.so.2.3.1 -l/usr/lib/libopencv_legacy.so.2.3.1 -l/usr/lib/libopencv_objdetect.so.2.3.1 -l/usr/lib/libopencv_calib3d.so.2.3.1 -l/usr/lib/libopencv_features2d.so.2.3.1 -l/usr/lib/libopencv_video.so.2.3.1 -l/usr/lib/libopencv_highgui.so.2.3.1 -l/usr/lib/libopencv_ml.so.2.3.1 -l/usr/lib/libopencv_imgproc.so.2.3.1 -l/usr/lib/libopencv_flann.so.2.3.1 -l/usr/lib/libopencv_core.so.2.3.1

I am using Ubuntu 10.04.3 LTS (Lucid).(Lucid). I also just switched from diamondback to electric, which was installed using "sudo apt-get install ros-electric-desktop-full".

Any advice would be appreciated. If this is not the appropriate place to ask this question, I apologize, and please direct me to the appropriate place. Also, if I have not provided sufficient information or explained my question in enough detail, please let me know what additional information I can provide.

Thanks!