简体   繁体   English

eclipse:java.lang.UnsatisfiedLinkError

[英]eclipse: java.lang.UnsatisfiedLinkError

I'm working on javacv project but every time I try to declare a matrix as below: 我正在研究javacv项目,但每次我尝试声明如下矩阵:

Mat trainingData = new Mat();

I get this error: 我收到此错误:

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat()J
at org.opencv.core.Mat.n_Mat(Native Method)
at org.opencv.core.Mat.<init>(Mat.java:447)

And when i search for a solution, i always found that i have to add: 当我搜索解决方案时,我总是发现我必须添加:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

But i'm always having the same error. 但我总是有同样的错误。

The UnsatisfiedLinkError is thrown at runtime when an application attempts to load a native library and that library does not exist. 当应用程序尝试加载本机库并且该库不存在时,将在运行时抛出UnsatisfiedLinkError。

It sounds like something went wrong when attaching your library or your library was not set up correctly in your IDE. 在附加库时听起来有些问题,或者在IDE中没有正确设置库。

See: http://docs.opencv.org/doc/tutorials/introduction/java_eclipse/java_eclipse.html#java-eclipse 请参阅: http//docs.opencv.org/doc/tutorials/introduction/java_eclipse/java_eclipse.html#java-eclipse

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM