Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniopencv_xfeatures2d in java.library.path #316

Closed
wei-hai opened this issue Jan 27, 2016 · 5 comments
Labels

Comments

@wei-hai
Copy link

wei-hai commented Jan 27, 2016

I wrote a small demo to use SIFT in xfeatures2d however when I built the program all other libs were loaded without problem except this one:

Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/py/wjtsvfh11xb18bcyf3l0m_rrvvk7b7/T/javacpp132060842439838/libjniopencv_xfeatures2d.dylib: dlopen(/private/var/folders/py/wjtsvfh11xb18bcyf3l0m_rrvvk7b7/T/javacpp132060842439838/libjniopencv_xfeatures2d.dylib, 1): Library not loaded: @rpath/libopencv_shape.3.0.dylib
  Referenced from: /private/var/folders/py/wjtsvfh11xb18bcyf3l0m_rrvvk7b7/T/javacpp132060842439838/./libopencv_xfeatures2d.3.0.dylib
  Reason: image not found

I am using Mac OS X and the version is 10.10.5

@saudet
Copy link
Member

saudet commented Jan 27, 2016

Ok, could you please try to call Loader.load(opencv_shape.class) before using opencv_xfeatures2d and see if that works around the problem? Thanks!

@wei-hai
Copy link
Author

wei-hai commented Jan 27, 2016

it works, and I also need to call Loader.load(opencv_calib3d.class). Is it a building issue?

@saudet saudet added the bug label Jan 28, 2016
@gpostelnicu
Copy link

Hi,

The same issue rises in Scala, where it can be solved by adding:

  Loader.load(classOf[opencv_shape])
  Loader.load(classOf[opencv_calib3d])

I am happy to send a pull request with this fix if it helps.

saudet added a commit to bytedeco/javacpp-presets that referenced this issue Feb 1, 2016
@saudet
Copy link
Member

saudet commented Feb 1, 2016

Thanks @gpostelnicu, but it's not a big deal. I've fixed it in the commit above.

Thanks for reporting @wei-hai!

@saudet
Copy link
Member

saudet commented May 19, 2016

Fixed in version 1.2! Aagain, thanks for reporting.

@saudet saudet closed this as completed May 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants