Skip to content

How to Build Electron Source Code for gl in Electron@25+ and Node@18+ Versions #291

Open

Description

@2284730142

Introduction
I am currently trying to build my project in the specified environment, but I am consistently encountering an issue that is preventing the build from completing. I have looked through various posts related to Electron, but they primarily address canvas-related problems rather than those concerning OpenGL. If possible, I would appreciate a tutorial or guidance on this topic. Any help would be greatly appreciated.

Error
I am receiving the following error:
webgl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr<class v8::BackingStore> __cdecl v8::ArrayBuffer::GetBackingStore(void)" referenced in function "public: __cdecl Nan::TypedArrayContents<char>::TypedArrayContents<char>(class v8::Local<class v8::Value>)"

Activity

  1. 2284730142 commented on Jul 22, 2024

    @2284730142
    Author

    https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules#%E5%85%B3%E4%BA%8Ewin_delay_load_hook%E7%9A%84%E8%AF%B4%E6%98%8E
    I tried the methods in this document, but still encountered the problems mentioned above. It's really frustrating.

  2. 2284730142 commented on Jul 23, 2024

    @2284730142
    Author

    Maybe adding support for node-addon-api in binding.gyp could help Electron compile successfully. I'm not familiar with this configuration, so if anyone knows how to adjust it, please share the updated configuration! Thank you very much.

  3. CRswallow commented on Jan 31, 2026

    @CRswallow

    Excuse me, have you solved your problem? I'm also encountering this issue when using gl in Electron, electron-rebuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions