Loading a x86_64 .dll file on windows

Greetings all, wondering if anyone has run into this issue?
I have a simple test program:

fn main() {
  let lib = libloading::open(Path::new("c:\path\to\my.dll")).unwrap();

This fails if I try to load a x64 .dll. 32bit dlls load just fine.
I’ve tried using the shared_library crate, it has the same results.
Changing the toolset has no effect on the result.

Any ideas?

So, I’m an idiot. I managed to build both my dlls as 32 bits. Instead of one of each (x32 and x64). So of course I had issues with the x64, but 32 worked just fine. :stuck_out_tongue:

1 Like