compiler error with libraries not found

Hi

I am trying to compile a simple program that is using the opencv library and get following message

gcc webcam.c -o webcam -I"/usr/include/opencv" -lcv -lhighgui 
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: cannot find -lcv
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: cannot find -lhighgui
collect2: ld returned 1 exit status

I did install libopencv2_3 and the libraries are there:

ls -lrat /usr/lib*/libopencv*
-rwxr-xr-x 1 root root  933256 Oct 30 05:51 /usr/lib64/libopencv_features2d.so.2.3.1
-rwxr-xr-x 1 root root 2021672 Oct 30 05:51 /usr/lib64/libopencv_core.so.2.3.1
-rwxr-xr-x 1 root root  374472 Oct 30 05:51 /usr/lib64/libopencv_contrib.so.2.3.1
-rwxr-xr-x 1 root root  619448 Oct 30 05:51 /usr/lib64/libopencv_calib3d.so.2.3.1
-rwxr-xr-x 1 root root 1931872 Oct 30 05:51 /usr/lib64/libopencv_imgproc.so.2.3.1
-rwxr-xr-x 1 root root  576168 Oct 30 05:51 /usr/lib64/libopencv_highgui.so.2.3.1
-rwxr-xr-x 1 root root  195008 Oct 30 05:51 /usr/lib64/libopencv_gpu.so.2.3.1
-rwxr-xr-x 1 root root  426400 Oct 30 05:51 /usr/lib64/libopencv_flann.so.2.3.1
-rwxr-xr-x 1 root root  253528 Oct 30 05:51 /usr/lib64/libopencv_video.so.2.3.1
-rwxr-xr-x 1 root root  374080 Oct 30 05:51 /usr/lib64/libopencv_objdetect.so.2.3.1
-rwxr-xr-x 1 root root  466080 Oct 30 05:51 /usr/lib64/libopencv_ml.so.2.3.1
-rwxr-xr-x 1 root root  770456 Oct 30 05:51 /usr/lib64/libopencv_legacy.so.2.3.1
lrwxrwxrwx 1 root root      22 Mar 19 15:20 /usr/lib64/libopencv_video.so -> libopencv_video.so.2.3
lrwxrwxrwx 1 root root      26 Mar 19 15:20 /usr/lib64/libopencv_objdetect.so -> libopencv_objdetect.so.2.3
lrwxrwxrwx 1 root root      19 Mar 19 15:20 /usr/lib64/libopencv_ml.so -> libopencv_ml.so.2.3
lrwxrwxrwx 1 root root      23 Mar 19 15:20 /usr/lib64/libopencv_legacy.so -> libopencv_legacy.so.2.3
lrwxrwxrwx 1 root root      24 Mar 19 15:20 /usr/lib64/libopencv_imgproc.so -> libopencv_imgproc.so.2.3
lrwxrwxrwx 1 root root      24 Mar 19 15:20 /usr/lib64/libopencv_highgui.so -> libopencv_highgui.so.2.3
lrwxrwxrwx 1 root root      20 Mar 19 15:20 /usr/lib64/libopencv_gpu.so -> libopencv_gpu.so.2.3
lrwxrwxrwx 1 root root      22 Mar 19 15:20 /usr/lib64/libopencv_flann.so -> libopencv_flann.so.2.3
lrwxrwxrwx 1 root root      27 Mar 19 15:20 /usr/lib64/libopencv_features2d.so -> libopencv_features2d.so.2.3
lrwxrwxrwx 1 root root      21 Mar 19 15:20 /usr/lib64/libopencv_core.so -> libopencv_core.so.2.3
lrwxrwxrwx 1 root root      24 Mar 19 15:20 /usr/lib64/libopencv_contrib.so -> libopencv_contrib.so.2.3
lrwxrwxrwx 1 root root      24 Mar 19 15:20 /usr/lib64/libopencv_calib3d.so -> libopencv_calib3d.so.2.3
lrwxrwxrwx 1 root root      26 Mar 19 15:27 /usr/lib64/libopencv_calib3d.so.2.3 -> libopencv_calib3d.so.2.3.1
lrwxrwxrwx 1 root root      26 Mar 19 15:27 /usr/lib64/libopencv_contrib.so.2.3 -> libopencv_contrib.so.2.3.1
lrwxrwxrwx 1 root root      23 Mar 19 15:27 /usr/lib64/libopencv_core.so.2.3 -> libopencv_core.so.2.3.1
lrwxrwxrwx 1 root root      29 Mar 19 15:27 /usr/lib64/libopencv_features2d.so.2.3 -> libopencv_features2d.so.2.3.1
lrwxrwxrwx 1 root root      24 Mar 19 15:27 /usr/lib64/libopencv_flann.so.2.3 -> libopencv_flann.so.2.3.1
lrwxrwxrwx 1 root root      22 Mar 19 15:27 /usr/lib64/libopencv_gpu.so.2.3 -> libopencv_gpu.so.2.3.1
lrwxrwxrwx 1 root root      26 Mar 19 15:27 /usr/lib64/libopencv_highgui.so.2.3 -> libopencv_highgui.so.2.3.1
lrwxrwxrwx 1 root root      26 Mar 19 15:27 /usr/lib64/libopencv_imgproc.so.2.3 -> libopencv_imgproc.so.2.3.1
lrwxrwxrwx 1 root root      25 Mar 19 15:27 /usr/lib64/libopencv_legacy.so.2.3 -> libopencv_legacy.so.2.3.1
lrwxrwxrwx 1 root root      21 Mar 19 15:27 /usr/lib64/libopencv_ml.so.2.3 -> libopencv_ml.so.2.3.1
lrwxrwxrwx 1 root root      28 Mar 19 15:27 /usr/lib64/libopencv_objdetect.so.2.3 -> libopencv_objdetect.so.2.3.1
lrwxrwxrwx 1 root root      24 Mar 19 15:27 /usr/lib64/libopencv_video.so.2.3 -> libopencv_video.so.2.3.1

Anybody knows why they are not being properly linked? I suspect something with 64 bit, that’s why I post it here.

thank you for any hint!

On 2012-03-19 14:56, serengeti wrote:
>
> Anybody knows why they are not being properly linked? I suspect
> something with 64 bit, that’s why I post it here.

I guess you would have more luck in the programming forum.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)