sbffi icon indicating copy to clipboard operation
sbffi copied to clipboard

Library not found

Open fabio-rsys opened this issue 4 years ago • 3 comments

I have two doubts: 1 - I'm trying to run a 32 bit dll in a 64 bit node instalation, it's possible? 2 - I'm receiving the message "Library not found" even though the path is correct, any idea why this could happen?

fabio-rsys avatar Dec 07 '20 19:12 fabio-rsys

1 - I'm trying to run a 32 bit dll in a 64 bit node instalation, it's possible?

I don't think that's going to work. Is there any chance you can use a 64 bit dll or a 32 bit node?

2 - I'm receiving the message "Library not found" even though the path is correct, any idea why this could happen?

The path string is passed directly to the underlying dynamic library loading code. On Windows (just guessing Windows since you mentioned dll), this is: https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryw

Are you using absolute paths? That may help.

bengl avatar Dec 07 '20 19:12 bengl

1 I'm working on getting the 64 bit version of the dll, but finding problems compiling it because it's a really old project, hopefully will get it.

2 I'm using const libPath = "${__dirname}\\mydll.dll"; I'm sure it's the right path because when it's logged onto the console, I click on it and the dll is opened on vs code.

My guess is that, because it's a 32 bit version dll it's not recognized.

fabio-rsys avatar Dec 07 '20 19:12 fabio-rsys

My guess is that, because it's a 32 bit version dll it's not recognized.

That's my guess as well. I don't have a Windows machine handy to test, but maybe you can try loading a different dll that's 64 bit to see if that works?

You might have some success using 32-bit node?

bengl avatar Dec 07 '20 20:12 bengl

Closing this since it's ancient. Please feel free to comment again if you're still seeing this, particularly if there's any new information.

bengl avatar Feb 03 '23 23:02 bengl