OpenCV 4.5.0 Compile errors
I was able to successfully build the new OpenCV Version using cmake with the following commands: cmake -D BUILD_SHARED_LIBS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D WITH_PNG=OFF . make -j
I added the opencv-450.jar file to the dependencies and copies all files from opencv/build/lib to /usr/lib. However, when compiling my project with this library, I get the following errors:
Error:(14, 26) java: cannot access org.opencv.imgproc.Imgproc bad class file: /.../opencv/opencv-450.jar!/org/opencv/imgproc/Imgproc.class class file has wrong version 58.0, should be 55.0 Please remove or make sure it appears in the correct subdirectory of the classpath.
I use unix and java 11. Before upgrading I used OpenCV4.2.0. Any help is appreciated!
this is a java problem, not really an opencv one.
it seems, you built the opencv.jar with a newer sdk, than you use for your final program. can you check for multiple java sdk's on your box ?