You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under Linux, it works nicely. Under Windows it works if called directly from node or in a script, but if I call this using jest, I get Dynamic Linking Error: Win32 error 126.
There are two things here that puzzle me.
Why do I have to include the root path to the PATH env variable (lines marked with MARK)? If I delete these lines, the Windows version will create the 126 error also when calling the script directly. I don't understand this, because the dlls are in the ./lib/win directory and that is included via SetDllDirectory anyway.
The jest version works if I add the root folder of the script to PATH manually before I start jest. Either way (manually or by the lines marked with MARK), I can see that the root folder is in the PATH (via console.log), but it only works if I add it manually before starting jest.
The text was updated successfully, but these errors were encountered:
Sorry, folks, my error.
The problem was not the path variable, but the relative path to the dll (const pathToDll ='./lib/win/mylib.dll';). That needs to become an absolute path.
Not sure if this belongs here or rather in the jest issue tracker.
I wrote a package that uses native .dll/.so files. The including code looks like this:
Under Linux, it works nicely. Under Windows it works if called directly from node or in a script, but if I call this using jest, I get
Dynamic Linking Error: Win32 error 126
.There are two things here that puzzle me.
MARK
)? If I delete these lines, the Windows version will create the 126 error also when calling the script directly. I don't understand this, because the dlls are in the ./lib/win directory and that is included via SetDllDirectory anyway.MARK
), I can see that the root folder is in the PATH (via console.log), but it only works if I add it manually before starting jest.The text was updated successfully, but these errors were encountered: