Home > OS >  Under Linux RedHat7 Eclipse call OpenCV question ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Under Linux RedHat7 Eclipse call OpenCV question ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Time:09-20

OpenCV3.4.0, corporate IT on RedHat7 server installed correctly, the Linux version of Eclipse, including the CDT plugin is correctly installed, before compiling C/C + + project all normal operation, to use OpenCV recently, then install the software, C + + compiler, and in the Eclipse would specify OpenCV3.4.0 library files in a directory, add a simple test program of OpenCV, compilation is normal, no Error/Warning, but running in the Eclipse IDE environment compiled binaries, would be an Error:
Error while loading Shared libraries: libopencv_core. So. 3.4: always open a Shared object file: No to the file or directory

However under the Linux terminal command line mode manual operation just compiled binary can run correctly, didn't find the system environment variable doubt running environment, then add under run_configurations tags:


Add clear the OpenCV library catalog, and compile environment set in the same directory, it can compile by (compile environment don't put the OpenCV library directory will include in report compilation errors), operation should be no problem,,,

Thank you very much!

CodePudding user response:

solution: find libopencv_ beginning to library directory, under the/usr/local/lib, in/etc/ld. So. Conf., d/a new opencv below. The conf, write in/usr/local/lib, and finally carry out sudo ldconfig -v,
Reference: http://stackoverflow.com/questions/12335848/opencv-program-compile-error-libopencv-core-so-2-4-cannot-open-shared-object-f
  • Related