shaileshmulange / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

java.lang.UnsatisfiedLinkError: C:\Users\Rayal\AppData\Local\Temp\javacpp13442109794220\jniopencv_core.dll: %1 is not a valid application. #267

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Example Code:
import static com.googlecode.javacv.cpp.opencv_core.*; 
import static com.googlecode.javacv.cpp.opencv_imgproc.*; 
import static com.googlecode.javacv.cpp.opencv_highgui.*; 

public class Smoother {
    public static void smooth(String filename) {
        IplImage image = cvLoadImage(filename);
        if (image != null) {
            cvSmooth(image, image, CV_GAUSSIAN, 3);
            cvSaveImage("D:/temp", image);
            cvReleaseImage(image);  
        }
    }

    public static void main(String[] args) {
        smooth("d:/opencv.png") ;
    }
}

3.After I complied the code, the exception appeared.

What is the expected output? What do you see instead?
The exception information:
Exception in thread "main" java.lang.UnsatisfiedLinkError: 
C:\Users\Rayal\AppData\Local\Temp\javacpp14428647858316\jniopencv_core.dll: %1 
不是有效的 Win32 应用程序。
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary1(Unknown Source)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.load0(Unknown Source)
    at java.lang.System.load(Unknown Source)
    at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:422)
    at com.googlecode.javacpp.Loader.load(Loader.java:372)
    at com.googlecode.javacpp.Loader.load(Loader.java:319)
    at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:136)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.googlecode.javacpp.Loader.load(Loader.java:338)
    at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:97)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.googlecode.javacpp.Loader.load(Loader.java:338)
    at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:85)
    at Smoother.smooth(Smoother.java:7)
    at Smoother.main(Smoother.java:16)

PS:"不是有效的 Win32 应用程序" means "is not a valid Win32 application"

What version of the product are you using? On what operating system?
Runtime environment:
System:Win7(X64)
IDE:Eclipse(Version: Juno Service Release 1V)
Opencv:version(2.4.3)
Javacv:version(0.3)

Please provide any additional information below.

Original issue reported on code.google.com by rayal...@gmail.com on 29 Dec 2012 at 9:36

GoogleCodeExporter commented 9 years ago
Please try to follow the instructions on this page:
Common issues with OpenCV under Windows 7 
http://code.google.com/p/javacv/wiki/Windows7AndOpenCV

And please post your questions on the mailing list if possible next time, thank 
you!

Original comment by samuel.a...@gmail.com on 30 Dec 2012 at 6:34