使用 Visual Basic 2015 构建电子原生扩展
Building Electron Native Extensions using Visual Basic 2015
我目前所在的位置:
我已经开始研究我打算与 Electron 一起使用的 NodeJS 本机扩展,但是从以前的工作中我注意到,仅针对 NodeJS 的构建步骤与预期的一样,按照指令包含库并更改为输出扩展名为 .node 的 .dll 文件。
我面临的问题:
编译我的扩展时,它在 NodeJS 中进行了尝试和测试,但在 Electron 包含的 NodeJS 实例中不起作用 - 通过搜索我了解到这是我正在编译的头文件等的问题。使用 visual studio( 而不是 Visual Studio 代码 )构建的文档非常稀少,而且到处都指向使用 node-gyp——这是我试图避免的并使用纯 Visual Studio 2015.
构建
作为参考,当 运行 工作(在 NodeJS 中)NativeExtension 时,我收到以下错误(谷歌搜索让我得出结论,我正在编译错误的东西):
ELECTRON_ASAR.js:167 Uncaught Error: Module did not self-register.
有人可以阐明我可能哪里出错了吗?对于C++程序结构和编译方法,我是新手
The documentation for building with visual studio (not Visual Studio Code) is very sparse and everywhere generally points to using node-gyp - which is something I'm attempting to avoid and build using purely Visual Studio 2015.
有一种编译原生 Node 模块的标准方法,作为一个自我承认的新手,偏离它是不明智的。我建议你通读 Microsoft NodeJS guidelines and get your development environment properly configured to build via node-gyp
, once that's working you can start figuring out how to rebuild native Node modules for Electron.
我目前所在的位置:
我已经开始研究我打算与 Electron 一起使用的 NodeJS 本机扩展,但是从以前的工作中我注意到,仅针对 NodeJS 的构建步骤与预期的一样,按照指令包含库并更改为输出扩展名为 .node 的 .dll 文件。
我面临的问题:
编译我的扩展时,它在 NodeJS 中进行了尝试和测试,但在 Electron 包含的 NodeJS 实例中不起作用 - 通过搜索我了解到这是我正在编译的头文件等的问题。使用 visual studio( 而不是 Visual Studio 代码 )构建的文档非常稀少,而且到处都指向使用 node-gyp——这是我试图避免的并使用纯 Visual Studio 2015.
构建作为参考,当 运行 工作(在 NodeJS 中)NativeExtension 时,我收到以下错误(谷歌搜索让我得出结论,我正在编译错误的东西):
ELECTRON_ASAR.js:167 Uncaught Error: Module did not self-register.
有人可以阐明我可能哪里出错了吗?对于C++程序结构和编译方法,我是新手
The documentation for building with visual studio (not Visual Studio Code) is very sparse and everywhere generally points to using node-gyp - which is something I'm attempting to avoid and build using purely Visual Studio 2015.
有一种编译原生 Node 模块的标准方法,作为一个自我承认的新手,偏离它是不明智的。我建议你通读 Microsoft NodeJS guidelines and get your development environment properly configured to build via node-gyp
, once that's working you can start figuring out how to rebuild native Node modules for Electron.