[vlc-devel] JVLC - java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc-control' under Windows
Geert Lorang
geert.lorang at chello.be
Tue Apr 15 15:24:21 CEST 2008
Very small (but annoying) bugreport:
When using JVLC under Windows you always get this exception:
"Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to
load library 'vlc-control': The specified module could not be found."
while it works fine under Linux. After some digging i found the cause of
this behavior:
The DLL (under windows) is called "libvlc-control.dll" (under Linux it
is "libvlc-control.so").
BUT the code (bindings/java/org/videolan/jvlc/internal/LibVlc.java)
tries to load "vlc-control" instead of "libvlc-control".
The fact that it works under Linux and not under Windows is because of
the appended prefixes in NativeLibrary.java (JNA)
Take a look at lines 89-108 at
http://www.koders.com/java/fid29B53221DCA930D96D8DA5780B22125F53B331FB.aspx
(looks like JNA's svn is password protected)
There are a couple of solutions to fix this bug:
* Rename your dll under windows to "vlc-control.dll"
* Change the code in LibVlc.java to load "vlc-control" instead of
"libvlc-control" (preferred solution?)
* Let VLC produce "vlc-control.dll/so" at compilation time
Build information:
Linux: Ubuntu 7.10 - vlc-snapshot-20080410.tar.bz2
Windows: Windows XP Pro SP2 - cygwin - git checked out yesterday
Anyway, keep up the good work!
Geert Lorang
More information about the vlc-devel
mailing list