Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't load IA 32-bit .dll on a AMD 64-bit platform

I am trying to use SVMLight from Java, using the JNI wrapper on this page:

  static {     System.loadLibrary("lib/JNI_SVM-light-6.01/lib/svmlight");   } 

I get the following error:

... lib\JNI_SVM-light-6.01\lib\svmlight.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

Can I solve this by recompiling the .dll for 64 bit? How would I go about doing this? Is there some other workaround I can use? SVMLight makes the C source code available.

like image 696
Nick Heiner Avatar asked Nov 13 '11 16:11

Nick Heiner


People also ask

Can not load IA 32 bit .DLL on a AMD 64 bit platform?

That's all guys, In short, if you ever get an error Can't load IA 32-bit . dll on a AMD 64-bit platform, use 32-bit JVM to run your native 32-bit dll. You may get this very same error in Windows 7 or Windows 8, which are two popular 64-bit operating system.

Can I run a 32-bit DLL on a 64 bit machine?

On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link library (DLL). Additionally, a 32-bit process cannot load a 64-bit DLL. However, 64-bit Windows supports remote procedure calls (RPC) between 64-bit and 32-bit processes (both on the same computer and across computers).

Can't load AMD 64 bit .DLL on a IA 32 bit platform system signals will not be handled correctly?

If you are still getting that error after installing the 64 bit JRE, it means that the JVM running Gurobi package is still using the 32 bit JRE. Check that you have updated the PATH and JAVA_HOME globally and in the command shell that you are using. (Maybe you just need to exit and restart it.)

How do I change a 32-bit DLL to 64 bit?

Windows CAN NOT load a 32bit dll into a 64bit process - this is a limitation that you can not circumvent. This means that if your 32bit DLL does any P/Invokes to other 32bit DLLS (or uses any 32bit . Net DLLS) you will be entirely out of luck (you will need to run the entire website in 32bit).


1 Answers

Yes, you'll have to recompile the DLL for 64-bit. Your only other option is to switch to a 32-bit JVM, or otherwise get some 32-bit process to load the DLL on your behalf and communicate with that process somehow.

like image 100
Daniel Pryden Avatar answered Oct 04 '22 12:10

Daniel Pryden