fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' during npm install

爱⌒轻易说出口 提交于 2019-12-11 14:48:39

问题


I am writing code to load c++ dll from electron. My dll is 32 bit. I am using NaN and bindings to achieve this. I used the following commands to set build for 32 bit:

node-gyp clean configure build --verbose --arch=ia32 
npm set npm_config_arch ia32
npm install --arch=ia32 electron-prebuilt -g

When I run npm install I get the following error:

fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

Although I am able to build and run my module with the following command:

electron-rebuild -f -w yourmodule --arch=ia32

But I am wondering why npm install fails.

来源:https://stackoverflow.com/questions/56768227/fatal-error-lnk1112-module-machine-type-x86-conflicts-with-target-machine-typ

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!