Giter Site home page Giter Site logo

Comments (4)

SpaceK33z avatar SpaceK33z commented on June 8, 2024

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."

from nbind.

TanninOne avatar TanninOne commented on June 8, 2024

I think I found a fix, although I don't 100% understand it.

Merge this into your bindings.json

{
    "targets": [
        {
            "conditions": [
                [
                    'OS=="win"',
                    {
                        "libraries": [
                            "-DelayLoad:node.exe"
                        ],

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.
Why I don't have to do that for all the other native libraries I have no clue.

from nbind.

SpaceK33z avatar SpaceK33z commented on June 8, 2024

Thanks so much @TanninOne, this workaround worked!

from nbind.

TanninOne avatar TanninOne commented on June 8, 2024

Another related thing I just found out and still don't fully understand:
I was getting crashes when using c++ streams in a nbind extension running in electron.

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.

from nbind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.