Closed GoogleCodeExporter closed 8 years ago
Installing opencv(C:\OpenCV2.2) in the default location partially solves the
problem. I think hardcodings in opencv_core.java should do the trick in future.
Anyway after doing this you get:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
C:\Users\stefan\AppData\Local\Temp\jniopencv_core1286255167459062460.dll: Can't
find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at com.googlecode.javacpp.Loader.load(Loader.java:332)
at com.googlecode.javacpp.Loader.load(Loader.java:266)
at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:120)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.googlecode.javacpp.Loader.load(Loader.java:286)
at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:87)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.googlecode.javacpp.Loader.load(Loader.java:286)
at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:88)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.googlecode.javacpp.Loader.load(Loader.java:286)
at com.googlecode.javacv.cpp.opencv_objdetect.<clinit>(opencv_objdetect.java:85)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.googlecode.javacpp.Loader.load(Loader.java:286)
at com.sample.Example.main(Example.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
Original comment by bstef...@gmail.com
on 4 May 2011 at 1:59
OpenCV 2.2 does not come with binaries for 64-bit Windows. You need to compile
them yourself
Original comment by samuel.a...@gmail.com
on 5 May 2011 at 2:00
In case anyone is encountering this issue as well,
a simple fix is to use the 32bit JDK instead of the 64bit JDK, this solves the
linking error.
Original comment by jkirschn...@gmail.com
on 6 May 2011 at 5:02
I am using 32bit JDK and me too getting above exception
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Documents and
Settings\Comp\Local Settings\Temp\jniopencv_core6193263930032021817.dll: %1 is
not a valid Win32 application.
What is missing please help.
Original comment by bhush.fa...@gmail.com
on 20 Mar 2012 at 4:28
Please make sure to follow the instructions here:
Common issues with OpenCV under Windows 7
http://code.google.com/p/javacv/wiki/Windows7AndOpenCV
Original comment by samuel.a...@gmail.com
on 21 Mar 2012 at 4:45
Original issue reported on code.google.com by
bstef...@gmail.com
on 4 May 2011 at 12:19