-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatible with electron 4 and later? #129
Comments
I can reproduce this too with https://github.com/2bbb/node-abletonlink. It works perfectly fine on macOS, but on Windows crashes with "Module did not self-register." |
I think I found a fix, although I don't 100% understand it. Merge this into your bindings.json
So essentially adding the linker flag "/DelayLoad:node.exe". This apparently allows electron.exe to take the place of node.exe when the native library loads symbols from it. |
Thanks so much @TanninOne, this workaround worked! |
Another related thing I just found out and still don't fully understand: After quite a bit of bumbling about what seems to be causing it is that the c++ runtime functions are now also delay loaded and for reasons I don't know it seems to try and load those function from the electron.exe instead of the proper runtime dlls. Only solution I have so far is forcing the runtime to be linked statically. |
The operating system is Windows 10
I have a project that heavily relies on native libraries, some are based on nbind others use nan directly.
On electron 2 and 3 they all work, on electron 4 (tested 4.1.3) I can't get the nbind-based modules to load.
When I try to load nbind-based native modules they all produce an error message, either "Module did not self-register." or "The specified procedure could not be found."
I've debugged the second one and the error message from the api is "entry point not found".
Now I have a bit of an idea what's the trigger for this problem because starting with electron 4 they don't ship node.dll any more, that functionality is now apparently statically linked into electron.exe.
Still, with the same build settings I got all the non-nbind modules to load correctly so I was wondering in how far nbind might be playing into this.
The text was updated successfully, but these errors were encountered: