Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows\System32\lpsolve55j.dll: Can't find dependent libraries

When I try to use LPSolve for Java (mavenized version, http://code.google.com/p/lpsolve-java/source/checkout ), I get following error:

java.lang.UnsatisfiedLinkError: C:\Windows\System32\lpsolve55j.dll: Can't find dependent libraries
     at java.lang.ClassLoader$NativeLibrary.load(Native Method)
     at java.lang.ClassLoader.loadLibrary0(Unknown Source)
     at java.lang.ClassLoader.loadLibrary(Unknown Source)
     at java.lang.Runtime.loadLibrary0(Unknown Source)
     at java.lang.System.loadLibrary(Unknown Source)
     at lpsolve.LpSolve.<clinit>(LpSolve.java:274)

I

  • put lpsolve55j.dll in Windows\System32 and
  • added the directory C:\Program Files\LPSolve IDE to the PATH environment variable.

The error occurs both in eclipse (test case) as well as during execution of "mvn test".

None of this helps.

How can I fix this error?

like image 695
Dmitrii Pisarenko Avatar asked Jun 05 '12 18:06

Dmitrii Pisarenko


1 Answers

I did the following thing and it seems to work:

  1. Downloaded the dev package that fits my processor (64 bit)
  2. Extracted the archive into a folder
  3. Copied lpsolve55j.jar and lpsolve55j.dll into the directory from step 2
  4. Added the directory from step 2 to the PATH
  5. Included lpsolve55j.jar from the directory in step 2 into my java project (as an external directory).

Now it works.

like image 197
summerbulb Avatar answered Sep 18 '22 12:09

summerbulb