Ask Your Question

Revision history [back]

Moving OpenCV to another folder breaks it

Here is a weird thing. I am calling OpenCV 2.4.9 from Java (on Peppermint Linux 3).

It works fine.

But, when I rename the OpenCV installation directory (and of course the reference to the directory in my Java source) - it breaks.

Here's the error message:

java.lang.UnsatisfiedLinkError: /home/stefan/dev/opencv-2.4.9_/lib/libopencv_java249.so: libopencv_features2d.so.2.4: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)

So it DID find the first library (libopencv_java249.so) - but not the second one (libopencv_features2d.so.2.4). Even though both are in the same folder.

Does OpenCV remember the folder it is installed in? Is this about an env variable? (Not aware of any variables set.)

Sources: http://tinybrain.de/1003793 (original dir) http://tinybrain.de/1003796 (moved dir)