I have just installed OpenCV 2.4.5 and Eclipse IDE for C/C++ Developers on Ubuntu 12.10 and followed this opencv.org tutorial. The project builds with no errors but when I reach the "Running the executable" section from Eclipse, I get the following message after hitting Run:
/home/pedro/workspace/di/Debug/di: error while loading shared
libraries: libopencv_core.so.2.4: cannot open shared object file: No
such file or directory
Does anyone have any suggestions on how to solve this issue?
EDIT:
Using sudo dpkg -l | grep opencv
gives:
- ii libopencv-calib3d2.3 2.3.1-11ubuntu2 amd64 computer vision Camera Calibration library
- ii libopencv-contrib2.3 2.3.1-11ubuntu2 amd64 computer vision contrib library
- ii libopencv-core-dev 2.3.1-11ubuntu2 amd64 development files for libopencv-core
- ii libopencv-core2.3 2.3.1-11ubuntu2 amd64 computer vision core library
- ii libopencv-features2d2.3 2.3.1-11ubuntu2 amd64 computer vision Feature Detection and Descriptor Extraction library
- ii libopencv-flann-dev 2.3.1-11ubuntu2 amd64 development files for libopencv-flann
- ii libopencv-flann2.3 2.3.1-11ubuntu2 amd64 computer vision Clustering and Search in Multi-Dimensional spaces library
- ii libopencv-gpu-dev 2.3.1-11ubuntu2 amd64 development files for libopencv-gpu
- ii libopencv-gpu2.3 2.3.1-11ubuntu2 amd64 computer vision GPU Processing library
- ii libopencv-highgui2.3 2.3.1-11ubuntu2 amd64 computer vision High-level GUI and Media I/O library
- ii libopencv-imgproc-dev 2.3.1-11ubuntu2 amd64 development files for libopencv-imgproc
- ii libopencv-imgproc2.3 2.3.1-11ubuntu2 amd64 computer vision Image Processing library
- ii libopencv-legacy2.3 2.3.1-11ubuntu2 amd64 computer vision legacy library
- ii libopencv-ml-dev 2.3.1-11ubuntu2 amd64 development files for libopencv-ml
- ii libopencv-ml2.3 2.3.1-11ubuntu2 amd64 computer vision Machine Learning library
- ii libopencv-objdetect2.3 2.3.1-11ubuntu2 amd64 computer vision Object Detection library
- ii libopencv-video-dev 2.3.1-11ubuntu2 amd64 development files for libopencv-video
- ii libopencv-video2.3 2.3.1-11ubuntu2 amd64 computer vision Video analysis library
- ii opencv-doc 2.3.1-11ubuntu2 all OpenCV documentation and examples
- ii python-opencv 2.3.1-11ubuntu2 amd64 Python bindings for the computer vision library
- rc ros-fuerte-opencv2 2.4.2-0precise-20120908-1624-+0000 amd64 OpenCV
- rc ros-groovy-opencv2 2.4.4-1quantal-20130325-0857-+0000 amd64 OpenCV
Sorry the formatting is not the best.
The command "locate libopencv_core"
- /usr/lib/libopencv_core.a
- /usr/lib/libopencv_core.so
- /usr/lib/libopencv_core.so.2.3
- /usr/lib/libopencv_core.so.2
"locate libopencv" shows a extensive list that I don't know if it would be appropriate to copy it.
Ubuntu Quency Quantal 12.10 has 2.3.1 packages in it's repo:
OpenCV in Ubuntu 12.10 repo
The next version, raring has 2.4.
I'd uninstall Ubuntu 12.10's various v2.3.1 opencv related packages. (How did they got installed? Did you install them manually, or something pulled them in?). Then I'd try to compile+install the OpenCV source again. The install stage of the make procedure should provide libraries to you.