OpenCV Java build issue with apps/visualisation and xobjdetect\tools\waldboost_detector
enabled Java wrappers and tried compiling using the cmake commands cmake.exe --build . --config Release --target Install
I am getting below errors:
Done Building Project "C:\OpenCV-course\opencv-3.4.1\build\apps\visualisation\opencv_visualisation.vcxproj" (default ta rgets).
Done Building Project "C:\OpenCV-course\opencv-3.4.1\build\ALL_BUILD.vcxproj" (default targets) -- FAILED.
Done Building Project "C:\OpenCV-course\opencv-3.4.1\build\INSTALL.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\OpenCV-course\opencv-3.4.1\build\INSTALL.vcxproj" (default target) (1) -> "C:\OpenCV-course\opencv-3.4.1\build\ALL_BUILD.vcxproj" (default target) (3) -> "C:\OpenCV-course\opencv-3.4.1\build\modules\hdf\opencv_hdf.vcxproj" (default target) (51) -> (ClCompile target) -> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(737): warning C4267: 'initializing': conversi on from 'size_t' to 'int', possible loss of data [C:\OpenCV-course\opencv-3.4.1\build\modules\hdf\opencv_hdf.vcxproj]
"C:\OpenCV-course\opencv-3.4.1\build\INSTALL.vcxproj" (default target) (1) -> "C:\OpenCV-course\opencv-3.4.1\build\ALL_BUILD.vcxproj" (default target) (3) -> "C:\OpenCV-course\opencv-3.4.1\build\modules\java\jni\opencv_java.vcxproj" (default target) (55) -> "C:\OpenCV-course\opencv-3.4.1\build\modules\java\jar\opencv_java_jar.vcxproj" (default target) (57) -> (CustomBuild target) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" e xited with code 1. [C:\OpenCV-course\opencv-3.4.1\build\modules\java\jar\opencv_java_jar.vcxproj]
hi ;)
the warnings you show, are probably NOT the reason for the build failing. there must be more errors some lines above, can you take another look ? (search for:
error:
)also, if you're mainly interested in the java bindings, you can safely disable the apps and the xobjdetect module:
Generating opencv-341.jar Buildfile: C:\OpenCV-course\opencv-3.4.1\build\modules\java\jar\opencv\build.xml
jar: [javac] Compiling 295 source files to C:\OpenCV-course\opencv-3.4.1\build\modules\java\jar\opencv\build\classes [javac] C:\OpenCV-course\opencv-3.4.1\build\modules\java\jar\opencv\java\org\opencv\hdf\HDF5.java:301: error: met hod dscreate(int,int,int,String,int,int) is already defined in class HDF5 [javac] public void dscreate(int rows, int cols, int type, String dslabel, int compresslevel, int dims_chunk s) [javac] ^ [javac] C:\OpenCV-course\opencv-3.4.1\build\modules\java\jar\opencv\java\org\opencv\hdf\HDF5.java:329: error: met hod dscreate(int,int,int,String,int) is already defined in class HDF5
[javac] C:\OpenCV-course\opencv-3.4.1\build\modules\java\jar\opencv\java\org\opencv\hdf\HDF5.java:329: error: met hod dscreate(int,int,int,String,int) is already defined in class HDF5 [javac] public void dscreate(int rows, int cols, int type, String dslabel, int compresslevel) [javac] ^ [javac] C:\OpenCV-course\opencv-3.4.1\build\modules\java\jar\opencv\java\org\opencv\hdf\HDF5.java:343: error: met hod dscreate(int,int,int,String) is already defined in class HDF5 [javac] public void dscreate(int rows, int cols, int type, String dslabel) [javac] ^ [javac] 3 errors
I am getting above errors can you guide me
try to disable the hdf5 module:
(also, rather put code/errors like above into your question)
I added some more errors that I am facing in answer section, Can you please guide me
I was getting errors for videostab, I offed in build and tried building again. But again I am getting below errors ,but OpenCV-341.jar got generated and OpenCV-java341.dll file is not generated. while using the jar I am getting linkage errors:
C:\OpenCV-course\opencv-3.4.1\build\modules\java_bindings_generator\gen\cpp\shape.inl.hpp(1692): error C3861: 'Mat_to_vector_DMatch': identifier not found (compiling source file C:\OpenCV-course\opencv-3.4.1\mo dules\java\generator\src\cpp\opencv_java.cpp) [C:\OpenCV-course\opencv-3.4.1\build\modules\java\jni\opencv_java.vcxproj] features2d_converters.cpp Done Building Project "C:\OpenCV-course\opencv-3.4.1\build\modules\java\jni\opencv_java.vcxproj" (default targets) -- FAILED.
Done Building Project "C:\OpenCV-course\opencv-3.4.1\build\ALL_