Skip to content
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

Using electron-builder to rebuild canvas, then I meet this error: Canvas.obj : error LNK2001: Unresolved external symbol #2487

Open
Jason-Chan-rain opened this issue Feb 8, 2025 · 0 comments

Comments

@Jason-Chan-rain
Copy link

  • Electron-Builder Version: ^25.1.8
  • Node Version: v22.13.1
  • Electron Version: ^30.0.0
  • Target: Windows10
  • canvas: v2.11.2

I install the electron/rebuild and use .\node_modules\.bin\electron-rebuild.cmd to rebuild canvas. Then I run into the following issue:

“D:\workspace\AT-t1\test1\AcmerTool\node_modules\canvas\build\binding.sln”(Default Target) (1) ->
“D:\workspace\AT-t1\test1\AcmerTool\node_modules\canvas\build\canvas-postbuild.vcxproj.metaproj”Default Target) (2) ->
“D:\workspace\AT-t1\test1\AcmerTool\node_modules\canvas\build\canvas.vcxproj”(Default Target) (3) ->
(Link 目标) ->
  Canvas.obj : error LNK2001: Unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr<class v8::BackingStore> __cdecl v8::ArrayBuffer::GetBackingStore(void)" (__imp_?GetBackingStore@ArrayBuffer@v8@@QEAA?AV?$shared_ptr@VBackingStore@v8@@@std@@XZ) [D:\works
pace\AT-t1\test1\AcmerTool\node_modules\canvas\build\canvas.vcxproj]
  D:\workspace\AT-t1\test1\AcmerTool\node_modules\canvas\build\Release\canvas.node : fatal error LNK1120: 1 unresolved external command [D:\workspace\AT-t1\test1\AcmerTool\node_modules\canvas\build\canvas.vcxproj]

    24 个warning
    2 个error

已用时间 00:00:17.33
Error: `C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
    at ChildProcess.<anonymous> (D:\workspace\AT-t1\test1\AcmerTool\node_modules\@electron\node-gyp\lib\build.js:215:23)
    at ChildProcess.emit (node:events:524:28)
    at ChildProcess._handle.onexit (node:internal/child_process:293:12)

× Rebuild Failed

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'D:\workspace\AT-t1\test1\AcmerTool\node_modules\canvas'

Error: node-gyp failed to rebuild 'D:\workspace\AT-t1\test1\AcmerTool\node_modules\canvas'
    at ChildProcess.<anonymous> (D:\workspace\AT-t1\test1\AcmerTool\node_modules\@electron\rebuild\lib\module-type\node-gyp\node-gyp.js:121:24)
    at ChildProcess.emit (node:events:524:28)
    at ChildProcess._handle.onexit (node:internal/child_process:293:12)

Any idea how to solve this problem, hope for reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant