WalkerKnapp / devolay

A Java binding for the Newtek NDI(tm) SDK.
Apache License 2.0
54 stars 17 forks source link

Can't find dependent libraries #17

Closed JellevanAbbema closed 3 years ago

JellevanAbbema commented 3 years ago

So this is most likely a problem on my side but right now I'm at a loss and hope someone here can help me out.

When calling loadLibraries() I get an 'UnsatisfiedLinkError' with the following message: "C:\Users\ME\AppData\Local\Temp\devolay-natives18438449399369710411.dll: Can't find dependent libraries"

I had everything working with this library about half a year ago (with version 1.2.0), I had a small break and I recently started everything up again and updated all dependencies (and moving to version 2.0.0 of this library) but right now it's not working. I also changed my main drive and reinstalled most programs. I think it might be either my new C: drive or the new library version that caused this but I'm not sure.

Some more details: Windows 10 64bit NDI Runtime 4.5.1 installed JDK 14.0.2 (but also tested with OpenJDK 11.0.9)

WalkerKnapp commented 3 years ago

This is a happy coincidence, because I just was having an identical issue. I reinstalled my OS, and I was also getting that "Can't find dependent libraries" message, and was working on a fix. It turns out that the builds generated by the Github CI have a somewhat hidden dependency on some MinGW dlls.

I am looking into a proper fix for this, but a temporary solution is to put these two dlls into your working directory, or onto your PATH. devloay_extra_dependencies.zip (These files are "/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/libgcc_s_seh-1.dll" and "/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/libstdc++-6.dll" from a MinGW linux install, in case you want to retrieve them yourself)

WalkerKnapp commented 3 years ago

I'll leave this issue open to track a proper fix for this. It looks like G++ has an option to bundle these dlls with a single binary, but it doesn't seem to be working with the rest of my build configuration.

JellevanAbbema commented 3 years ago

Thank you for the quick response! The files you provided do indeed fix the issue, thank you so much! Hope you find the propper fix.

WalkerKnapp commented 3 years ago

A fix for this has been released in v2.0.1. Thanks for reporting!