sbffi
sbffi copied to clipboard
Library not found
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?
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.
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.
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?
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.